Gwei Calculator

Choose your Ethereum unit converter carefully...

What is Wei?

In Ethereum, 'wei' is the base unit of ether, with 1 ether equaling 10^18 wei. This denomination honors Wei Dai, a pioneer in cryptography and a key figure in the 1990s cypherpunk movement, known for conceptualizing bmoney, a precursor to smart contracts. Ether, essential for the Ethereum network's computational processes, is analogized as the network's 'fuel' or 'cryptofuel' (referred to as 'gas'). Transaction costs, or gas fees, are calculated by the transaction's complexity and volume, multiplied by the prevailing gas price, compensating for the computing resources used.

How is Wei Calculated?

The calculation is straightforward: to convert ether into wei, you multiply the amount of ether by 10^18. Conversely, to go from wei to ether, you divide the number of wei by 10^18. This system allows for precise transactions and is essential for the Ethereum network's smart contract functionality, as it enables users to specify transaction values down to very small fractions of ether, ensuring accuracy and avoiding the limitations of floating-point numbers in computing. Here's a little cheat sheet you can use:

Unit Wei Wei Value Gwei Value Ether Value
Wei 1 1 Wei 10-9 Gwei 10-18 ETH
Kwei 1,000 10-3 Wei 10-6 Gwei 10-15 ETH
Mwei 1,000,000 10-6 Wei 10-3 Gwei 10-12 ETH
Gwei 1,000,000,000 10-9 Wei 1 Gwei 10-9 ETH
Microether 1,000,000,000,000 10-12 Wei 10-3 Gwei 10-6 ETH
Milliether 1,000,000,000,000,000 10-15 Wei 10-6 Gwei 10-3 ETH
Ether 1,000,000,000,000,000,000 10-18 Wei 10-9 Gwei 1 ETH

Using the Tatum SDK to Estimate Fees

If you're building an app that requires estimating transaction fees, the fastest way is to do it through the Tatum SDK. Through simple JavaScript code, you'll be able to instantly fetch fees for Ethereum mainnet and testnets - and in fact any chain. Here's the code snippet you can test.

import { TatumSDK, Network, Ethereum } from '@tatumio/tatum'

const tatum = await TatumSDK.init<Ethereum>({network: Network.ETHEREUM})

const data = await tatum.fee.getCurrentFee()

Access All Tatum Tools

A powerful SDK, lightning-fast RPC nodes, faucets and a whole lot more for free.

Sign Up