UnlockPool Bitcoin Learning Center

Bitcoin Transaction Fee Calculation

For fee-rate-based wallet planning, a proposed Bitcoin on-chain fee is estimated from the applicable transaction vsize and selected rate. A larger amount sent does not inherently require a larger fee, and the fee is not defined as a percentage of the transferred value. In practical terms, a wallet constructs a transaction, estimates its size in virtual bytes, and applies a chosen rate in satoshis per virtual byte. The resulting fee is one input to transaction selection for limited block space. Current fee estimates help inform the rate a sender may choose, but they remain approximate recommendations for a confirmation target.

Bitcoin Transaction Fee Calculation: The Core Formula

For planning, proposed fee in satoshis ≈ applicable vsize in vB × selected fee rate in sat/vB, subject to whole-satoshi rounding and the vsize convention used. For example, a transaction estimated at 150 vB using a rate of 12 sat/vB would have a planned fee of 1,800 sats. The units are explicit: vB multiplied by sat/vB produces a result in satoshis.

For a completed transaction, the actual fee is directly observable as the difference between all input values and all output values: fee = total inputs − total outputs. Once final inputs, outputs, and the applicable vsize convention are known, realized fee rate is base fee divided by vsize. Multiplying that realized rate by the same vsize reproduces the base fee, subject to rounding.

Fee vs Fee Rate: Satoshis and sat/vB

The fee is the total amount paid, measured in sats or BTC. The fee rate is the density of that fee relative to transaction size, measured in sat/vB. Fee rate is an important comparison because block capacity is limited by weight. Bitcoin Core’s current mempool and block-template logic can also evaluate related transaction sets and policy-adjusted fees rather than only one transaction’s standalone fee rate.

sat/vB means satoshis per virtual byte. It is not a percentage, a dollar amount, or a price per bitcoin transferred. Bitcoin Core’s estimatesmartfee RPC reports estimates in BTC/kvB. When comparing tools, check each displayed unit and convert it consistently before assuming one rate is higher or lower.

Transaction Size, Weight, vBytes, Inputs, and Outputs

Bitcoin blocks account for transaction weight, not simply raw serialized bytes. Weight gives non-witness data four weight units per byte and witness data one weight unit per byte. Under BIP 141, virtual size is weight divided by four and rounded up to a whole vB. For ordinary fee estimation this is the common size basis; in Bitcoin Core mempool and RPC contexts, reported vsize can be sigops-adjusted and may be larger.

Final BIP 141 weight and virtual size depend on the transaction’s base and witness serialization. BIP 141 discounts witness data when computing weight. The final serialized transaction establishes its BIP 141 base size, total size, weight, and virtual size; Bitcoin Core RPC and mempool policy can instead report a sigops-adjusted vsize that is larger.

Worked Bitcoin Fee Calculation Examples

Suppose a completed transaction has a virtual size of 110 vB and a rate of 15 sat/vB. The calculation is 110 × 15 = 1,650 sats. If its inputs total 250,000 sats and all outputs total 248,350 sats, the input-minus-output calculation also gives a fee of 1,650 sats.

For a second example, consider a 260 vB transaction at 8 sat/vB. Its planned fee is 2,080 sats. Its larger total fee than a 150 vB transaction at 10 sat/vB does not give it the higher standalone fee rate: the first rate is 8 sat/vB and the second is 10 sat/vB. As a standalone numerical comparison, 10 sat/vB exceeds 8 sat/vB. Actual Bitcoin Core mempool and block-template decisions can instead use related transaction-set feerates and modified, policy-adjusted fees.

Why the Amount Sent Does Not Set the Network Fee

A larger amount sent does not inherently require a larger fee. In fee-rate-based wallet planning, the proposed fee follows from the applicable transaction vsize and selected rate rather than a percentage of the transferred value. The completed transaction’s actual base fee remains total inputs minus total outputs.

For fee-rate-based planning, the calculated fee depends on final vsize and the selected rate rather than being expressed as a percentage of the amount transferred. Final BIP 141 vsize follows from the transaction’s base and witness serialization, so use the final transaction structure when replacing an estimate with an exact calculation.

How Mempool Demand Changes the Fee Rate You May Choose

Bitcoin Core’s estimatesmartfee uses observed confirmation data to produce an approximate fee-rate estimate for a requested confirmation target. The estimate can change as observed conditions change, and the RPC can return an error when it lacks sufficient data.

No fee rate can promise a confirmation deadline. A fee estimate is an approximate recommendation for a confirmation target, not a promise, and Bitcoin Core can report that it has insufficient data for an estimate. A related UnlockPool page is available at /bitcoin-mempool.

How to Estimate a Fee Before Broadcast

Before signing, use the proposed transaction structure only to estimate an applicable vsize and fee. Only the final base and witness serialization fixes the final BIP 141 vsize; multiply that applicable size by the selected rate and round the proposed fee to whole satoshis as needed.

A related UnlockPool page is available at /bitcoin-fee-estimator. Regardless of interface, treat an estimated rate as approximate and recalculate if the proposed fee rate or final serialized transaction changes.

How to Verify the Actual Fee After Broadcast

Where referenced previous-output values are available, calculate the fee by summing those input values and subtracting the sum of the outputs. For a stated vsize convention, divide the fee by vsize to report the corresponding fee rate; Bitcoin Core RPC vsize may be sigops-adjusted.

Paste a transaction ID into UnlockPool’s Bitcoin Transaction Checker at /bitcoin-transaction-checker to inspect confirmations or mempool status, fees, virtual size, inputs, and outputs. Verification is especially useful when a wallet reports a fee in BTC while you want to understand the sat/vB rate that the transaction actually paid.

Common Bitcoin Fee Calculation Mistakes

A common error is multiplying a fee rate by raw serialized byte length rather than the applicable virtual size. BIP 141 derives virtual size from transaction weight, while Bitcoin Core RPC or mempool-policy vsize can be sigops-adjusted. State which convention a calculation uses and replace preliminary size assumptions with the final serialized transaction where possible.

Bitcoin Core’s estimatesmartfee RPC reports fee rates in BTC per thousand virtual bytes (BTC/kvB), while this guide uses sat/vB for its worked calculations. When comparing a wallet, node, or explorer display, check the stated unit and convert it consistently before comparing rates. A numerically larger-looking value is not necessarily a higher fee rate when the units differ.

Calculate and Check Bitcoin Fees with UnlockPool

Related UnlockPool pages include /bitcoin-fee-estimator and /bitcoin-mempool. The sourced product workflow in this article begins after broadcast with the Transaction Checker; fee estimates remain approximate rather than guarantees.

After broadcast, use the Bitcoin Transaction Checker at /bitcoin-transaction-checker to confirm what was actually paid. Compare the listed fee with total input and output values, then compare fee rate with vsize. If a transaction remains unconfirmed, first use the Transaction Checker to verify its status and recorded fee details when the transaction is visible to the explorer.

Frequently Asked Questions

How is a Bitcoin transaction fee calculated?

For planning, proposed fee in sats is approximately the applicable vsize multiplied by the selected sat/vB rate, subject to rounding and the size convention used. The completed transaction’s actual base fee equals total inputs minus total outputs.

What is the formula for a Bitcoin transaction fee?

For an estimate, use proposed fee (sats) ≈ applicable vsize (vB) × selected fee rate (sat/vB), then round appropriately to whole satoshis. To verify a completed transaction, use base fee = sum of inputs − sum of outputs.

What is the difference between a Bitcoin fee and fee rate?

The fee is the total number of sats paid by one transaction. Fee rate expresses how many sats are paid for each virtual byte, allowing transactions of different sizes to be compared for block-space priority.

What does sat/vB mean?

sat/vB means satoshis per virtual byte. It is a commonly used practical display unit for an on-chain Bitcoin fee rate, where BIP 141 virtual bytes are derived from transaction weight.

How do inputs and outputs affect a Bitcoin transaction fee?

The final transaction’s base and witness serialization determine its BIP 141 weight and virtual size. Apply the chosen fee rate to that final vsize convention rather than assuming a universal size for every transaction.

Does sending more bitcoin make the network fee higher?

Not directly. The network fee is driven by vsize and fee rate, not by the bitcoin amount or its fiat equivalent. A larger payment may cost more only if it requires additional inputs or a different transaction structure.

Can I know the exact Bitcoin fee before signing a transaction?

An estimate can use the proposed inputs, outputs, scripts, and selected rate. Final vsize is determined by the final serialized transaction, including witness data where present.

How can I check the fee paid by a confirmed or unconfirmed transaction?

Look up the transaction and compare the sum of its previous-output inputs with the sum of its outputs; the difference is the fee. UnlockPool’s Bitcoin Transaction Checker provides transaction details for inspecting the fee, virtual size, inputs, outputs, and confirmation or mempool status.

Summary

Bitcoin fee planning becomes clearer when size and rate are separated: use the applicable vsize convention with a selected sat/vB rate for an approximate proposed fee. Only final serialization fixes BIP 141 vsize, and the completed transaction’s base fee can be verified after broadcast as total inputs minus total outputs.

Explore Bitcoin with UnlockPool

Primary Technical References

Technical statements were reviewed against Bitcoin Core, Bitcoin Improvement Proposals, and first-party UnlockPool product pages.

  1. Bitcoin Core chain parameters
  2. Bitcoin Core raw transaction RPC
  3. Bitcoin Core fee estimation RPC
  4. Bitcoin Core mempool terminology
  5. BIP 141 - Segregated Witness
  6. BIP 125 - Replace-by-Fee
  7. Bitcoin Core 31.0 release notes
  8. UnlockPool Bitcoin Transaction Checker
  9. UnlockPool Bitcoin Block Explorer