How to Estimate Bitcoin Transaction Fees Using the Mempool
The core of estimating fees from the Bitcoin mempool depends on how soon you want the transaction confirmed—the faster, the higher the fee rate (unit: sat/vB). Wallets or block explorers read the current fee distribution of all pending transactions in the mempool and suggest tiers: slow, medium, fast, fastest.
A leading global cryptocurrency platform,suitable for both beginners and experienced traders.
New user benefit: 20% off trading fees upon registration!!
How the Mempool "Tells" You the Fee Rate
Bitcoin network does not have a unified "official fee". Each full node has its own mempool—a cache that holds broadcast but not yet included transactions.
When miners build blocks, they prioritize transactions with the highest fee rate (sat/vB). The higher the fee rate, the more likely it is to be included in the next block.
So "estimating fees" essentially means looking at what fee rates others are offering in the mempool.
Tools (like mempool.space) read all current transactions in the mempool, sort them from highest to lowest fee rate, and answer four questions:
What is the minimum fee required to get into the next block? (Fastest)
What is the minimum fee needed for confirmation within 3 blocks? (Fast)
What is the minimum fee for within 6 blocks? (Medium)
What is the minimum fee if you're willing to wait longer? (Slow)
Practical: Three Steps to Calculate the Fee Yourself
Step 1: Check the current recommended fee rate
What to do: Open mempool.space or your wallet and check the current recommended sat/vB values.
How to do it:
Case A (using mempool.space): The homepage displays four fee tiers directly: "Fastest", "Half Hour", "Hour", "Economy".
Case B (using a wallet send interface): Most wallets (like Electrum, Sparrow) show "Slow/Medium/Fast" options on the send page, corresponding to different sat/vB values.
Case C (using API): Call
https://mempool.space/api/v1/fees/recommended, which returnsfastestFee,halfHourFee,hourFee,economyFeefields.
When is this step complete: You have obtained at least one current fee rate value (unit: sat/vB).
Step 2: Estimate your transaction size
What to do: Determine how many virtual bytes (vB) your transaction will use.
How to do it:
Case A (using wallet): Most wallets display "transaction size" or "bytes" after you enter the recipient address and amount.
Case B (manual estimation): A typical SegWit transaction is around 140–170 vB; transactions with many inputs will be larger. You can roughly estimate using the formula:
size ≈ number of inputs × 68 + number of outputs × 31 + 10(SegWit estimate).
When is this step complete: You have an estimated transaction size (in vB).
Step 3: Calculate total fee
What to do: fee rate × size = total fee (in satoshis).
How to do it:
total fee (sats) = fee rate (sat/vB) × transaction size (vB).When is this step complete: You have a specific satoshi amount that you can enter into your wallet.
Prerequisite: You do not need to run a full node. Public services like mempool.space offer free real-time fee rate queries.
Different Fee Tiers and What They Mean
| Tier | Estimated Confirmation Time | Typical sat/vB (depending on congestion) |
|---|---|---|
| Fastest | Next block | Top 10%-90% percentile of network's highest fee rate |
| Half Hour | ~3 blocks | Slightly lower than Fastest |
| Hour | ~6 blocks | Medium-low |
| Economy | Longer | Close to the minimum effective fee rate |
During congestion: Fees can spike to 100–200+ sat/vB; during low activity: as low as 1–5 sat/vB.
Common failure cause: Setting a fee below the minimum relay fee (usually 1 sat/vB) will cause the transaction to be rejected by nodes and stuck in the wallet. It's best to add a few sat/vB above the minimum.
Risk warning: Fee rates change in real time; they may have changed between checking and broadcasting. If the transaction remains unconfirmed for long, you can use RBF (Replace-By-Fee) to boost the fee and replace the original transaction. Also, transaction size depends on the number of inputs—if you have many small UTXOs (unspent transaction outputs), spending several at once will increase the transaction size and thus the fee. Consider consolidating UTXOs during low-fee periods.
A leading global cryptocurrency platform,suitable for both beginners and experienced traders.
New user benefit: 20% off trading fees upon registration!!
Advanced: If you want to estimate fees yourself rather than relying on a wallet
If you are building your own wallet or service, you can use open-source libraries like Augur (Block's mempool statistical model) or BTCRouter, which simulate mempool evolution using historical data to predict fee rates for different confirmation targets.
Academic research shows that traditional statistical models (such as SARIMAX) outperform complex deep learning models for 24-hour fee rate prediction, as they require less data.
How to confirm your calculation is effective:
Open the "transaction accelerator" or "fee estimation" page on mempool.space, enter your calculated sat/vB and transaction size—if the displayed "estimated confirmation time" matches your expectations, your calculation is reasonable. Convert the total fee (sats) to BTC and enter it in your wallet's send interface; the transaction should be mined within your chosen timeframe.
