DEAL20% OFF
Pre Black FridaySALE
--
Days
--
Hours
--
Minutes
--
Seconds
Book a call
DEAL20% OFF
Pre Black FridaySALE
--
Days
--
Hours
--
Minutes
--
Seconds
Book a call
GLITCH40% OFF
Price Glitch40% OFF
00
Days
00
Hours
05
Minutes
00
Seconds
Claim 40% Off
GLITCH40% OFF
Price Glitch40% OFF
00
Days
00
Hours
05
Minutes
00
Seconds
Claim 40% Off

Free Ethereum tool

Gas to USD Ethereum Calculator

Work out what an Ethereum transaction costs in dollars. Enter the current ETH price, the gas price in gwei, and the gas the transaction uses. The calculator converts gas to ETH and USD instantly.

Check the live gas price in your wallet or on a block explorer such as Etherscan, and the ETH price on any exchange, then paste them in.

Calculate gas cost

USD

e.g. 3000

gwei

Base fee + priority fee, e.g. 20

gas

Total cost in USD

$—

Enter the ETH price and gas price to see the cost.

How to calculate Ethereum gas fees in USD

Every Ethereum transaction pays for the computation it uses. That computation is measured in gas, and each unit of gas is priced in gwei (one billionth of an ETH). The fee is:

fee (ETH) = gas used × gas price (gwei) ÷ 1,000,000,000
fee (USD) = fee (ETH) × ETH price (USD)

Example: a plain ETH transfer uses 21,000 gas. At 20 gwei that is 420,000 gwei, or 0.00042 ETH. With ETH at $3,000, the transfer costs $1.26.

What sets the gas price?

Since the London upgrade (EIP-1559), the gas price has two parts: a base fee, set by the protocol and burned, which rises when blocks are busy and falls when they are quiet; and a priority fee (tip) you add to get included faster. Gas used depends on what the transaction does: more computation and storage writes in a smart contract means more gas.

For a deeper explanation, read our guide What are Ethereum gas fees?

Want to write gas-efficient smart contracts?

Metana's Web3 Solidity Bootcamp covers gas optimization and Yul, alongside Solidity, DeFi and smart contract security, in a part-time online program with a job guarantee.

Gas to USD FAQ

Multiply the gas used by the gas price in gwei to get the fee in gwei, divide by 1,000,000,000 to convert gwei to ETH, then multiply by the current ETH price in US dollars. For example, a plain ETH transfer uses 21,000 gas; at a gas price of 20 gwei that is 420,000 gwei, or 0.00042 ETH, which is $1.26 when ETH trades at $3,000.

Gwei is a denomination of ether used to price gas. One gwei is one billionth of an ETH (0.000000001 ETH), or one billion wei, the smallest unit of ether. Gas prices are quoted in gwei because fees in whole ETH would be tiny decimals.

Since the London upgrade (EIP-1559), every Ethereum block has a base fee that rises when blocks are more than half full and falls when they are less full, plus an optional priority fee (tip) paid to validators. When the network is busy, the base fee goes up, so the same transaction costs more gwei per unit of gas.

A simple ETH transfer always uses 21,000 gas. Smart contract interactions use more, depending on how much computation and storage the contract performs: an ERC-20 token transfer commonly uses around 45,000 to 65,000 gas, and swaps, mints and DeFi actions can use well over 100,000. Your wallet shows the estimated gas limit before you confirm a transaction.

Smart contract developers cut gas by minimizing storage writes, packing variables into fewer storage slots, using calldata instead of memory for read-only inputs, avoiding unbounded loops, and, for hot paths, writing optimized code in Yul (EVM assembly). Gas optimization is a core module in Metana's Web3 Solidity Bootcamp.

Build on Ethereum

Talk to a real human about becoming a Web3 developer.

Speak with an advisor. We'll map the right program to your goals - and lock in your enrollment offer.

20% off enrollment offer

20% OFF - limited-time enrollment offer.

Applied automatically when you book a call before the timer hits zero.

--
Days
--
Hours
--
Minutes
--
Seconds
  • No pressure — just a 20-minute fit conversation
  • Solidity, Rust and beginner Web3 tracks
  • 100% tuition refund if you don't land a qualifying job
Advisor Elena RodriguezAdvisor Sarah JenningsAdvisor David Chen
Real advisors · reply within 2 hours

Book your call

Free