Skip to main content

Gas Cost Calculator

Build EVM opcode pipelines, analyze gas costs by category, and estimate real-world transaction fees.

EVM Opcodes

Quick Recipes

Pre-built opcode sequences

Execution Pipeline

Click opcodes above to build your execution pipeline

Gas Meter

0
Total Gas
Dust (free-ish)
01005005K20K20K+

Cost Breakdown

Add opcodes to see the cost breakdown

Real-World Cost Estimator

Gas Price30 gwei
1 gwei500 gwei
Gas Used
0
Cost (ETH)
0.00e+0
Cost (USD)
$0.000000

Based on ETH price of $3,500. Actual costs vary with network conditions.

Stack Depth

Add opcodes to see stack depth

Gas Hogs

Most expensive in pipeline

Add opcodes to see the top gas consumers

Opcode Reference

54 opcodes
Name
Hex
Category
Gas
Add
CREATE0xf0Calls/Create32,000
CREATE20xf5Calls/Create32,000*
SSTORE0x55Storage5,000*
BALANCE0x31Environment2,600*
CALL0xf1Calls/Create2,600*
STATICCALL0xfaCalls/Create2,600*
DELEGATECALL0xf4Calls/Create2,600*
SLOAD0x54Storage2,100*
LOG40xa4Logging1,875
LOG30xa3Logging1,500
LOG20xa2Logging1,125
LOG10xa1Logging750
LOG00xa0Logging375
SHA30x20Crypto30*
BLOCKHASH0x40Environment20
EXP0x0aArithmetic10*
JUMPI0x57Control Flow10
ADDMOD0x08Arithmetic8
MULMOD0x09Arithmetic8
JUMP0x56Control Flow8
MUL0x02Arithmetic5
DIV0x04Arithmetic5
MOD0x06Arithmetic5
PUSH10x60Stack3
PUSH320x7fStack3
DUP10x80Stack3
SWAP10x90Stack3
MLOAD0x51Stack3
ADD0x01Arithmetic3
SUB0x03Arithmetic3
LT0x10Compare/Bitwise3
GT0x11Compare/Bitwise3
EQ0x14Compare/Bitwise3
ISZERO0x15Compare/Bitwise3
AND0x16Compare/Bitwise3
OR0x17Compare/Bitwise3
XOR0x18Compare/Bitwise3
NOT0x19Compare/Bitwise3
MSTORE0x52Memory3
MSTORE80x53Memory3
MCOPY0x5eMemory3*
CALLDATALOAD0x35Memory3
POP0x50Stack2
MSIZE0x59Memory2
ADDRESS0x30Environment2
ORIGIN0x32Environment2
CALLER0x33Environment2
CALLVALUE0x34Environment2
GASPRICE0x3aEnvironment2
TIMESTAMP0x42Environment2
JUMPDEST0x5bControl Flow1
STOP0x00Control Flow0
RETURN0xf3Control Flow0
REVERT0xfdControl Flow0
Fun Fact

The term 'gas' was chosen because, like fuel, it powers the Ethereum Virtual Machine but is consumed in the process.

Understanding EVM Gas Costs

Every operation on the EVM has a gas cost that reflects its computational complexity and state impact. Simple arithmetic (ADD, SUB) costs 3 gas, while storage writes (SSTORE) can cost 5,000-20,000 gas. After EIP-2929, the first access to a storage slot or address is "cold" (expensive) while subsequent accesses are "warm" (cheaper). Understanding these costs is key to writing gas-efficient smart contracts.