What is WEI?

3/5/2024, 8:53:04 AM
This article introduces WEI—the smallest denomination of Ether, the currency used to facilitate transaction operations on the Ethereum blockchain network, where 10^18 or 1,000,000,000,000,000,000 wei is equivalent to one Ether.

Wei is the smallest denomination of ether, the currency used to facilitate transactional operations on the Ethereum blockchain network, where 10^18 or 1,000,000,000,000,000,000 wei is equivalent to one ether. \

Wei is named after Wei Dai, a computer science graduate of the University of Washington who formerly worked in the cryptography research department at Microsoft. Wei Dai was part of a cypherpunk movement in the 1990s whose members developed the theoretical underpinnings for cryptocurrencies in the 2010s. For his innovation of bmoney, discussed in a self-published proto-crypto manifesto which laid the foundation for smart contracts, the atomic unit of ether is named after him.

Since all services and applications built on top of the Ethereum network require computational power, which is not freely available, some form of payment for the computational power is required.

Although ether is the currency of the network, it is often metaphorically referred to as the “fuel” of the Ethereum network. Its utility value as a cryptofuel is commonly referred to as “gas”.

Gas is a core part of all network requests and the sender of requests is required to pay for consumed computing resources. The overall gas cost is calculated based on both the volume and complexity of the request multiplied by the current gas price.

What are the denominations of Wei?

While the US dollar can only be divided into 100 equal parts i.e. into pennies, cryptocurrencies can be divided into much smaller atomic units.

These units ensure appropriate denotation of ether that may appear to be relatively small but is in fact a larger amount when converted to US dollars or other major currencies.

Therefore, ether has multiple different levels of wei. Each subunit indicates the quantity of units but as mentioned above, have alternative names.

What is Gwei?

Gwei, a blend of the words wei and giga, a unit prefix for billion, is another denomination of ether, the digital currency used on the Ethereum blockchain network. There are 1 billion wei in one gwei and there are 10^9 or 1,000,000,000 gwei in one ether. Gwei is also referred to as nanoether or Shannon, after Claude Shannon, a prominent American mathematician and cryptographer who’s regarded as the father of information theory.

By virtue of how gas prices function and are denoted, Gwei is the most commonly used unit of ether. As gas is the pricing value deemed necessary to execute a contract or other form of transaction on the Ethereum network, gwei is needed to pay for the computational power.

The standard transaction fee is 21,000 gwei on the Ethereum blockchain network. Typically, transaction fees will rise proportionately to the underlying complexity of the transaction

In July 2021, as part of the London Hard Fork, Ethereum Investment Proposal (EIP) 1559 changed the Ethereum blockchain network’s fee mechanism. Formerly, developers and the broader ecosystem had to rely upon a price auction, where the highest bidder would have their transaction processed first.

With the introduction of EIP-1559, a discrete base-fee would be registered for transactions to be included in the next block. Nevertheless, certain individuals can add a “tip” or “priority fee” to ensure a miner prioritizes their transaction. Developers interested in a deeper understanding of how to send transactions using EIP-1559 can read Alchemy’s EIP-1559 documentation.

The methodology to calculate the transaction fee is by using the following formula:

Gas Units (Limit) x (Base Fee + Tip)

Ultimately, fees based on block demand are far more straightforward and transparent for users today. In addition, developers can build a gas-fee estimator using EIP-1559 methods through Alchemy.

How to Convert Wei to Gwei

The three steps for converting wei to gwei is to divide the total amount of wei by 1 billion.

Developers can use a conversion calculator to understand the relationship between wei and gwei, or follow this simple step-by-step process:

  1. Count the number of amount of wei
  2. Use a base divisor of 10^9 or 1 billion
  3. Divide the number of wei by the base divisor

This will give you the overall number of gwei.

For example, 420,069,000,000 wei / 1,000,000,000 = 420.069 gwei.

To calculate the price in terms of USD, multiply your total gwei by the current price of one Ether divided by 1,000,000,000 (10^9).

For example, if Ether is worth $1,000, then 420.069 gwei equals $0.000420069, or approximately 1/25th of one cent.

How to Convert Wei to ETH

Similar to converting Wei to Gwei, users can use a wei converter or follow a 3-step conversion process:

  1. Count the quantity of wei in total
  2. Use a base divisor of 10^18 or 1 quintillion
  3. Divide the number of wei by the base divisor.

This will give you the total amount of ETH.

For example 100 trillion wei / 10^18 = 0.0001 ETH.

To calculate the price in terms of USD, multiply your ETH by the current price of ETH.
For example, 0.0001 ETH is equal to $0.10 when 1 ETH costs $1,000 USD.

How to Convert Wei to ETH from Code

Here’s how to convert ETH to gwei using the Alchemy SDK:

  1. Install the alchemy SDK
  2. Enter or retrieve the amount you want to convert
  3. Call the formatEther method to convert to ETH

Here’s an example of how to get the ether balance from vitalik.eth (returned in gwei) and print it out in terms of ETH:
const { Alchemy, Utils } = require(‘alchemy-sdk’);
const alchemy = new Alchemy();
const main = async () => {
// Set wallet address
const address = ‘vitalik.eth’;
// Get balance and format in terms of ETH
let balance = await alchemy.core.getBalance(address, ‘latest’);
balance = Utils.formatEther(balance); // convert it to Ether
console.log(Balance of ${address}: ${balance} ETH);
}
main();

Disclaimer:

  1. This article is reprinted from [alchemy], All copyrights belong to the original author [Brady Werkheiser]. If there are objections to this reprint, please contact the Gate Learn team, and they will handle it promptly.
  2. Liability Disclaimer: The views and opinions expressed in this article are solely those of the author and do not constitute any investment advice.
  3. Translations of the article into other languages are done by the Gate Learn team. Unless mentioned, copying, distributing, or plagiarizing the translated articles is prohibited.

Share

Crypto Calendar

Project Updates
Etherex will launch the token REX on August 6.
REX
22.27%
2025-08-06
Rare Dev & Governance Day in Las Vegas
Cardano will host the Rare Dev & Governance Day in Las Vegas, from August 6 to 7, featuring workshops, hackathons and panel discussions focused on technical development and governance topics.
ADA
-3.44%
2025-08-06
Blockchain.Rio in Rio De Janeiro
Stellar will participate in the Blockchain.Rio conference, scheduled to be held in Rio de Janeiro, from August 5 to 7. The program will include keynotes and panel discussions featuring representatives of the Stellar ecosystem in collaboration with partners Cheesecake Labs and NearX.
XLM
-3.18%
2025-08-06
Webinar
Circle has announced a live Executive Insights webinar titled “The GENIUS Act Era Begins”, scheduled for August 7, 2025, at 14:00 UTC. The session will explore the implications of the newly passed GENIUS Act—the first federal regulatory framework for payment stablecoins in the United States. Circle’s Dante Disparte and Corey Then will lead the discussion on how the legislation impacts digital asset innovation, regulatory clarity, and the US’s leadership in global financial infrastructure.
USDC
-0.03%
2025-08-06
AMA on X
Ankr will host an AMA on X on August 7th at 16:00 UTC, focusing on DogeOS’s work in building the application layer for DOGE.
ANKR
-3.23%
2025-08-06

Related Articles

What Are Altcoins?
Beginner

What Are Altcoins?

An altcoin is also known as a Bitcoin Alternative or Alternative Cryptocoin, which refers to all cryptocurrencies other than Bitcoin. Most of the cryptocurrencies in the early stage were created through forking (copying Bitcoin codes).
11/21/2022, 8:49:07 AM
What is Blum? All You Need to Know About BLUM in 2025
Intermediate

What is Blum? All You Need to Know About BLUM in 2025

Blum is a unique mini-app accessible on Telegram. Its goal is to redefine cryptocurrency trading by offering a hybrid exchange that combines access to tokens from centralized and decentralized exchanges within a single platform.
5/22/2025, 2:44:00 AM
What Is Ethereum 2.0? Understanding The Merge
Intermediate

What Is Ethereum 2.0? Understanding The Merge

A change in one of the top cryptocurrencies that might impact the whole ecosystem
1/18/2023, 2:25:24 PM
What Is Dogecoin?
Beginner

What Is Dogecoin?

Dogecoin is a memecoin and probably the most unique one among dozens of mainstream cryptocurrencies.
12/6/2022, 6:21:38 AM
Reflections on Ethereum Governance Following the 3074 Saga
Intermediate

Reflections on Ethereum Governance Following the 3074 Saga

The Ethereum EIP-3074/EIP-7702 incident reveals the complexity of its governance structure: in addition to the formal governance processes, the informal roadmaps proposed by researchers also have significant influence.
6/12/2024, 2:04:52 AM
What Is Solana?
06:10
Beginner

What Is Solana?

As a blockchain project, Solana aims to optimize network scalability and increase speed, and adopts a unique proof of history algorithm to significantly improve the efficiency of on-chain transactions and sequencing.
3/3/2023, 3:30:19 AM
Start Now
Sign up and get a
$100
Voucher!