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 sequencesExecution Pipeline
Click opcodes above to build your execution pipeline
Gas Meter
Cost Breakdown
Add opcodes to see the cost breakdown
Real-World Cost Estimator
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 pipelineAdd opcodes to see the top gas consumers
Opcode Reference
54 opcodesName | Hex | Category | Gas | Add |
|---|---|---|---|---|
| CREATE | 0xf0 | Calls/Create | 32,000 | |
| CREATE2 | 0xf5 | Calls/Create | 32,000* | |
| SSTORE | 0x55 | Storage | 5,000* | |
| BALANCE | 0x31 | Environment | 2,600* | |
| CALL | 0xf1 | Calls/Create | 2,600* | |
| STATICCALL | 0xfa | Calls/Create | 2,600* | |
| DELEGATECALL | 0xf4 | Calls/Create | 2,600* | |
| SLOAD | 0x54 | Storage | 2,100* | |
| LOG4 | 0xa4 | Logging | 1,875 | |
| LOG3 | 0xa3 | Logging | 1,500 | |
| LOG2 | 0xa2 | Logging | 1,125 | |
| LOG1 | 0xa1 | Logging | 750 | |
| LOG0 | 0xa0 | Logging | 375 | |
| SHA3 | 0x20 | Crypto | 30* | |
| BLOCKHASH | 0x40 | Environment | 20 | |
| EXP | 0x0a | Arithmetic | 10* | |
| JUMPI | 0x57 | Control Flow | 10 | |
| ADDMOD | 0x08 | Arithmetic | 8 | |
| MULMOD | 0x09 | Arithmetic | 8 | |
| JUMP | 0x56 | Control Flow | 8 | |
| MUL | 0x02 | Arithmetic | 5 | |
| DIV | 0x04 | Arithmetic | 5 | |
| MOD | 0x06 | Arithmetic | 5 | |
| PUSH1 | 0x60 | Stack | 3 | |
| PUSH32 | 0x7f | Stack | 3 | |
| DUP1 | 0x80 | Stack | 3 | |
| SWAP1 | 0x90 | Stack | 3 | |
| MLOAD | 0x51 | Stack | 3 | |
| ADD | 0x01 | Arithmetic | 3 | |
| SUB | 0x03 | Arithmetic | 3 | |
| LT | 0x10 | Compare/Bitwise | 3 | |
| GT | 0x11 | Compare/Bitwise | 3 | |
| EQ | 0x14 | Compare/Bitwise | 3 | |
| ISZERO | 0x15 | Compare/Bitwise | 3 | |
| AND | 0x16 | Compare/Bitwise | 3 | |
| OR | 0x17 | Compare/Bitwise | 3 | |
| XOR | 0x18 | Compare/Bitwise | 3 | |
| NOT | 0x19 | Compare/Bitwise | 3 | |
| MSTORE | 0x52 | Memory | 3 | |
| MSTORE8 | 0x53 | Memory | 3 | |
| MCOPY | 0x5e | Memory | 3* | |
| CALLDATALOAD | 0x35 | Memory | 3 | |
| POP | 0x50 | Stack | 2 | |
| MSIZE | 0x59 | Memory | 2 | |
| ADDRESS | 0x30 | Environment | 2 | |
| ORIGIN | 0x32 | Environment | 2 | |
| CALLER | 0x33 | Environment | 2 | |
| CALLVALUE | 0x34 | Environment | 2 | |
| GASPRICE | 0x3a | Environment | 2 | |
| TIMESTAMP | 0x42 | Environment | 2 | |
| JUMPDEST | 0x5b | Control Flow | 1 | |
| STOP | 0x00 | Control Flow | 0 | |
| RETURN | 0xf3 | Control Flow | 0 | |
| REVERT | 0xfd | Control Flow | 0 |
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.