How are Bitcoin transaction fees calculated?
The fee depends on the transaction's size, not on the amount sent.1 It is the size in virtual bytes (vB) times a fee rate in sats per vB, and miners pick the best fee rates first.2,3
What an address is
An address is where someone asks to be paid. A legacy address holds the hash of a public key (Module 7 covers keys), plus a checksum to catch typos.4
You can tell the type of a Bitcoin address by how it starts:5
| Starts with | Type | What it is |
|---|---|---|
1 |
Legacy (P2PKH) | Pays to the hash of one public key5,4 |
3 |
Script hash (P2SH) | Pays to the hash of a script, most often a multisig5,4 |
bc1q |
SegWit version 0 | Uses the bech32 format5,6 |
bc1p |
Taproot (SegWit version 1) | Uses the bech32m format5,7 |
The bc1 addresses are normally written in lowercase, and their last six characters are a checksum.6 In an address of the expected length, any mistake that affects four characters or fewer is always caught.5
The whitepaper suggested a new key pair for every transaction, so payments are harder to link together.8 Using one address again and again lets others track your payments on the public chain.4
Size, not amount
There is no fee to receive bitcoin.1 By custom, the sender pays.2
The fee has nothing to do with how much you send. Sending 100,000 bitcoin can cost the same fee as sending 1.1 What matters is how much space the transaction takes up in a block.1,2
Size is measured in virtual bytes (vB). Since the SegWit upgrade in 2017, a transaction's weight is divided by 4 to give its virtual size.9,3 A block can hold 4,000,000 weight units, which is 1,000,000 vB.9,3
Fee rate
Miners compare transactions the way you might compare the price per kilo of rice: they divide each fee by its size.2 The result is the fee rate. It is most often written in sats per virtual byte, or sat/vB.2,3
So the sum is: fee = size in vB × fee rate in sat/vB.2,3 To turn sats into bitcoin, divide by 100,000,000.1
Waiting in the mempool
Before it is mined, a transaction waits in a mempool: a node's queue of unconfirmed transactions. Each node keeps its own, so they can differ.3
No rule and no miner sets the fee. The sender chooses it, like a bid in an auction for space in the next block.2 A higher fee rate generally means a quicker confirmation.3 Rates change all the time, so check the suggested rate right before you send.3
If a transaction was sent with replace-by-fee (RBF) turned on and gets stuck, it can be replaced by a version with a higher fee.3 Since Bitcoin Core 28.0, released in October 2024, its nodes accept such a replacement by default even when RBF wasn't turned on.10,2 This is called full RBF.2
- Frequently Asked Questions. Bitcoin.org.
- Mastering Bitcoin, 3rd edition, chapter 9: Transaction Fees. Andreas M. Antonopoulos and David A. Harding (CC BY-SA 4.0), GitHub, December 2023.
- Mempool FAQ. mempool.space (open-source block explorer).
- Transactions (Bitcoin Developer Guide). Bitcoin Developer Documentation (developer.bitcoin.org).
- Mastering Bitcoin, 3rd edition, chapter 4: Keys and Addresses. Andreas M. Antonopoulos and David A. Harding (CC BY-SA 4.0), GitHub, December 2023.
- BIP 173: Base32 address format for native v0-16 witness outputs (bech32). Bitcoin Improvement Proposals (github.com/bitcoin/bips).
- BIP 350: Bech32m format for v1+ witness addresses. Bitcoin Improvement Proposals (github.com/bitcoin/bips), Assigned 16 December 2020.
- Bitcoin: A Peer-to-Peer Electronic Cash System. Satoshi Nakamoto (the Bitcoin whitepaper), 2008.
- BIP 141: Segregated Witness (Consensus layer). Bitcoin Improvement Proposals (github.com/bitcoin/bips), Assigned 21 December 2015.
- Bitcoin Core 28.0 release notes. Bitcoin Core project (bitcoincore.org), 2 October 2024.
General education built from the publicly available sources listed above. Not financial, legal, tax or investment advice. Naming a company, project or regulator is not an endorsement either way. Last checked 2026-10-22. Terms and disclaimer.