Gwei
Denomination of ETH equal to 1,000,000,000 wei.
Gwei is a denomination commonly used for Ethereum gas prices. One gwei equals one billion wei, or 0.000000001 ETH. The name combines giga, meaning one billion, with wei, the smallest named unit of ether.
Gas prices are usually small fractions of ETH per unit, making gwei easier to read. Instead of showing 0.000000025 ETH per gas, a wallet can display 25 gwei. The notation reduces long decimals but does not change the amount paid. It is a unit conversion, not a separate token.
To calculate an execution fee, multiply gas used by the effective gas price. If a transaction uses 21,000 gas at 20 gwei, it costs 420,000 gwei, which equals 0.00042 ETH. The equivalent fiat cost depends on ETH's market price. More complex contract calls consume more gas even when the price per unit is identical.
Under EIP-1559, wallets may show several gwei values: the base fee, priority fee, and maximum fee per gas. The effective price reflects the required base fee plus the eligible tip, capped by the maximum. Users should not assume the highest number shown is automatically the amount charged.
Gwei matters because unit mistakes can create extreme overpayment or underpriced transactions. Developer tools and JSON-RPC interfaces may return fee values as wei, sometimes encoded in hexadecimal, while a human enters gwei in a wallet. Production code should use integer or precise big-number arithmetic rather than floating-point calculations that can round values incorrectly.
Other EVM-compatible networks may display gas prices in gwei even though their native fee asset has another name. Layer 2 total costs can also include a separate data charge. Always confirm the network, fee currency, gas used, and display unit before signing. Gwei makes gas pricing readable, but the complete cost still depends on execution, protocol rules, congestion, and native-asset value.
Developers should label input units explicitly and reject values outside reasonable bounds. Converting through strings or big-integer libraries avoids precision loss in JavaScript and other environments where ordinary numbers cannot represent large wei amounts safely. Unit tests should cover zero, fractional gwei, maximum settings, and round-trip conversion so a display change cannot silently alter transaction cost.
Frequently asked questions
- Typical Ethereum gas prices would be awkward as long wei integers or tiny ETH decimals. Gwei provides a readable middle unit for base fees, priority fees, and maximum fees per gas. It describes a price per gas unit, not the complete transaction cost. Total cost also depends on how much gas execution consumes and any additional Layer 2 data fee.
- One gwei equals 1,000,000,000 wei and 0.000000001 ETH, or 10 to the power of negative nine ETH. Multiply a gwei amount by one billion to obtain wei, or divide by one billion to obtain ETH. For a transaction fee, first multiply gwei per gas by gas used, then convert the result.
- Ethereum wallets, gas trackers, node responses, and block explorers commonly display base fee, priority fee, and effective gas price in gwei. Raw JSON-RPC values may be hexadecimal wei and require conversion. Other EVM networks can also use gwei notation even when their native asset is not ETH, so always confirm the network and currency.
