Gas Cost Calculator

Gas units × gas price — the actual cost of a transaction, with presets for common actions.

Check the Gas Tracker for a live price.

Total cost

0.00042 ETH

420000000000000 wei

A transaction fee is just multiplication

Every transaction fee comes down to two numbers: how much computation it used (gas units) and how much you agreed to pay per unit (gas price). Everything else — EIP-1559’s base fee and priority fee, L2 data fees, wallet fee estimates — is ultimately about arriving at those two numbers; once you have them, the cost itself is a straight multiplication.

Why a quick manual calculation is useful

Before signing anything, or when comparing “what would this roughly cost at a calmer time”, it’s often faster to plug in a gas price and a typical gas-limit ballpark than to wait on a live estimate. It won’t be exact — your wallet’s simulation against the actual contract always will be — but it’s accurate enough for planning.

How this tool works

Your Gwei price is converted to wei and multiplied by the gas units entirely with viem’s arbitrary-precision unit handling — no floating-point rounding, all client-side.

Frequently asked questions

cost = gas units × gas price. Gas price is normally quoted in Gwei (1 Gwei = 10⁹ wei = 10⁻⁹ ETH), so this tool converts your Gwei price to wei, multiplies by the gas units, and shows the result in the chain's native token.

Your wallet estimates gas before you sign — that estimate is the real number for your specific transaction. The presets here are typical ballparks for common actions, useful for rough planning, not a substitute for your wallet's actual simulation.

The arithmetic is identical everywhere — what changes is the token the result is denominated in. All five chains here use an 18-decimal native token, so switching chains just relabels the same computed wei amount.

No — it treats "gas price" as a single effective rate, which is what you actually pay per unit either way (base fee + priority fee, post-1559). If you have those as two separate numbers, add them together before entering a price here.