Aptos Gas Fee Calculator

How It Works

The Aptos Gas Fee Calculator estimates the gas fees for a transaction based on the following inputs:

  • Instruction Gas: Gas cost based on the complexity of the transaction, including function calls and operations.
  • Storage Gas: Gas cost based on reading and writing data to global storage.
  • Payload Size: Gas cost based on the size of the transaction payload in bytes.

Example:

If a transaction has:

  • Instruction Gas: 100,000
  • Storage Gas: 500,000
  • Payload Size: 1,000 bytes

The estimated gas fee would be calculated as follows:

  1. Calculate the payload gas. Since 1,000 bytes exceeds the large transaction cutoff of 600 bytes, the additional gas for 400 bytes is 400 * 2000 = 800,000.
  2. Add instruction gas, storage gas, and payload gas: 100,000 + 500,000 + 1,500,000 + 800,000 = 2,900,000 internal gas units.
  3. Convert to external gas units by dividing by the scaling factor: 2,900,000 / 1,000,000 = 2.9.
  4. Multiply by the minimum gas price: 2.9 * 100 = 290 octas (or 0.000290 APT).