Utilix knowledge base
Gwei, Wei, and ETH — Ethereum Units Explained
Published May 3, 2026
Ethereum has its own unit hierarchy, similar to how dollars have cents. The smallest unit is called Wei, and the most common unit for gas prices is Gwei. Understanding these units is essential for working with Ethereum transactions.
The Ethereum Unit Hierarchy
| Unit | Value in ETH | Value in Wei |
|---|---|---|
| Ether (ETH) | 1 | 10^18 |
| Gwei (gigawei) | 0.000000001 | 10^9 |
| Mwei (megawei) | 0.000000000001 | 10^6 |
| Kwei (kilowei) | 0.000000000000001 | 10^3 |
| Wei | 0.000000000000000001 | 1 |
The key relationships to memorize:
1 ETH = 1,000,000,000 Gwei (10^9)
1 ETH = 10^18 Wei
1 Gwei = 10^9 Wei
Why Wei?
Wei is named after Wei Dai, a cryptographer who proposed b-money, a precursor to Bitcoin. Wei is the atomic unit of Ether — the smallest amount that can exist in an Ethereum transaction. No fractional Wei is possible.
Because 1 ETH = 10^18 Wei, Wei values are very large integers. For example, a transaction sending 1 ETH represents 1,000,000,000,000,000,000 Wei internally.
Why Gwei?
Gas prices are typically 10–100 Gwei. Expressing these as Wei would require writing 10,000,000,000 to 100,000,000,000 — awkward. Expressing them in ETH would require 0.00000001 to 0.0000001.
Gwei (10^9 Wei) hits the sweet spot: "20 Gwei" is readable and meaningful.
Converting Between Units
To convert ETH to Gwei: multiply by 1,000,000,000
To convert Gwei to ETH: divide by 1,000,000,000
To convert ETH to Wei: multiply by 10^18
To convert Wei to ETH: divide by 10^18
To convert Gwei to Wei: multiply by 1,000,000,000
Example: What is 15 Gwei in ETH?
15 / 1,000,000,000 = 0.000000015 ETH
Example: What is 0.001 ETH in Gwei?
0.001 × 1,000,000,000 = 1,000,000 Gwei
Gwei in Gas Calculations
A gas fee is calculated as:
Fee (ETH) = Gas Units × Gas Price (Gwei) × 10^-9
For a standard ETH transfer (21,000 gas units) at 20 Gwei:
21,000 × 20 × 10^-9 = 0.00042 ETH
At $3,000 per ETH, that is $1.26.
Precision and Floating-Point
Because 1 ETH = 10^18 Wei, Wei values exceed JavaScript's safe integer limit (2^53 ≈ 9 × 10^15). Applications that work with Wei amounts use BigInt or libraries like ethers.js or viem that handle arbitrary-precision arithmetic.
When displaying ETH amounts to users, always format from the Wei integer representation rather than floating-point arithmetic to avoid rounding errors.
Quick Reference Card
| You see | Meaning |
|---|---|
| "20 Gwei gas price" | Each unit of gas costs 20 × 10^-9 ETH |
| "0.001 ETH fee" | 1,000,000 Gwei = 10^15 Wei |
| "1 ETH" | 10^9 Gwei = 10^18 Wei |