Calculation method
How MoonMath calculates gas fees
Gas Fee Planner — What could this transaction cost at the currently observed fee tiers?
The formula
Unit conversion: on EVM chains, gas units × gas price in gwei valued at the native token's price; on Solana, the base fee plus compute units × the priority rate. Tier comparison holds the workload fixed and varies only the price.
What it reads
- The workload in gas units or compute units
- The gas price or priority rate
- The native token's price in dollars
- For comparison, a set of price tiers
What it assumes
- The workload is a preset assumption, not a measurement: real contract execution, calldata, account state and signatures change the units used
- The EVM path uses one flat gas price with no base and priority split, and no refund of unused gas
- Tier comparison assumes the identical workload executes under each tier
- The native price is one spot value applied at signing time
What this does not establish
- It does not establish confirmation timing: a lower cost now does not guarantee timely inclusion, and rates change before signing
- It is not the cost actually charged, since real used units differ from the preset
- It is not a layer-two total: data charges on the settlement layer are excluded
- It does not recommend a tier — it reports the difference from the cheapest
Run it
Estimate a transaction's native-token and USD cost from observed network fee tiers and a transparent gas or compute-unit assumption. Compare current tiers without claiming a guaranteed confirmation time.
Open the Gas Fees calculatorHow the market itself works
This page describes MoonMath's arithmetic. The mechanics section describes the market: how an order book forms a price, why order-book depth is not the same thing as pool liquidity, and what a public book does and does not let you observe.
Read the market mechanics