# Bitcoin transaction fees and the mempool: how fees are set and why they spike

A Bitcoin transaction fee is total input value minus total output value. Its fee rate divides that amount by the transaction’s virtual size, commonly expressed in satoshis per virtual byte. Each node maintains its own pending-transaction pool. Replacement and dependent-spend fee strategies have wallet and node-policy conditions and do not guarantee inclusion.

Evidence: [Bitcoin Developer Guide: Transactions (Transaction Fees and Change)](https://developer.bitcoin.org/devguide/transactions.html); [BIP141: Segregated Witness (Consensus layer)](https://raw.githubusercontent.com/bitcoin/bips/927b6de9915c9262615a6399de51b200f81e5aa4/bip-0141.mediawiki); [Bitcoin Core package policy](https://raw.githubusercontent.com/bitcoin/bitcoin/v29.0/doc/policy/packages.md); [bumpfee RPC](https://bitcoincore.org/en/doc/29.0.0/rpc/wallet/bumpfee/); [Bitcoin Core mempool maintenance](https://raw.githubusercontent.com/bitcoin/bitcoin/v29.0/src/txmempool.cpp)

Canonical: https://degreesofsatoshi.com/encyclopedia/bitcoin-transaction-fees-and-mempool/
Published: 2026-09-23
Substantively modified: 2026-10-02
Independently verified by an automated reviewer: 2026-10-02T18:26:58.075Z

AI-assisted research and drafting with a separate automated source-verification pass; no external expert or named human review is implied.

## Key facts

- **Fee unit:** Satoshis per virtual byte (sat/vB); a virtual byte is the transaction’s weight divided by four, rounded up to a whole virtual byte ([BIP141: Segregated Witness (Consensus layer)](https://raw.githubusercontent.com/bitcoin/bips/927b6de9915c9262615a6399de51b200f81e5aa4/bip-0141.mediawiki); [Mempool Replacements (doc/policy/mempool-replacements.md)](https://raw.githubusercontent.com/bitcoin/bitcoin/69142eacd1374925cc9e4ea736c21fcec16307d0/doc/policy/mempool-replacements.md))
- **What the fee is:** The value of a transaction’s inputs minus the value of its outputs; the miner keeps the difference ([Bitcoin Developer Guide: Transactions (Transaction Fees and Change)](https://developer.bitcoin.org/devguide/transactions.html))
- **Block capacity:** At most 4,000,000 weight units per block; before SegWit the limit was 1,000,000 bytes ([BIP141: Segregated Witness (Consensus layer)](https://raw.githubusercontent.com/bitcoin/bips/927b6de9915c9262615a6399de51b200f81e5aa4/bip-0141.mediawiki))
- **Default mempool size:** 300 megabytes in Bitcoin Core, a cap introduced in version 0.12.0 on 23 February 2016 ([Bitcoin Core 0.12.0 release notes](https://bitcoincore.org/en/releases/0.12.0/))
- **Default expiry:** Bitcoin Core’s documented default expiry is 336 hours; eviction, rebroadcast and configuration affect what any particular node retains ([Increase mempool expiry time to 2 weeks (pull request #9312)](https://github.com/bitcoin/bitcoin/pull/9312))
- **Opt-in replace-by-fee:** Specified in BIP125, dated 4 December 2015, and shipped in Bitcoin Core 0.12.0 ([BIP125: Opt-in Full Replace-by-Fee Signaling](https://raw.githubusercontent.com/bitcoin/bips/927b6de9915c9262615a6399de51b200f81e5aa4/bip-0125.mediawiki); [Bitcoin Core 0.12.0 release notes](https://bitcoincore.org/en/releases/0.12.0/))
- **Full replace-by-fee:** Default in Bitcoin Core from version 28.0; a transaction no longer has to signal that it can be replaced ([Mempool Replacements (doc/policy/mempool-replacements.md)](https://raw.githubusercontent.com/bitcoin/bitcoin/69142eacd1374925cc9e4ea736c21fcec16307d0/doc/policy/mempool-replacements.md))
- **Fee estimator:** Bitcoin Core’s estimatesmartfee targets confirmation within 1 to 1,008 blocks ([estimatesmartfee RPC reference (Bitcoin Core 27.0)](https://bitcoincore.org/en/doc/27.0.0/rpc/util/estimatesmartfee/))

## A fee is whatever the sender leaves on the table

A Bitcoin transaction does not have a fee field. It spends some coins it controls, called inputs, and it creates new coins for the recipients, called outputs. Whatever value goes in and does not come out is the fee, and the miner who packs the transaction into a block keeps it. That is the whole mechanism. If the inputs add up to a little more than the outputs, the difference is the fee, whether the sender meant it or not.

Because an input has to be spent in full, most transactions include a change output that sends the surplus back to the sender. The developer documentation puts it plainly: the full value of the included inputs must be spent or given to a miner as a transaction fee. Wallets do this arithmetic for you, which is why fees feel like a separate line item even though, on the ledger, they are simply the gap between what went in and what came out. Our article on [UTXOs](/encyclopedia/what-is-a-utxo/) explains why coins work this way.

The fee is also the miner’s only payment for including your transaction in particular. The rest of a miner’s income, the block subsidy, arrives regardless of which transactions the block contains, and it [halves](/encyclopedia/bitcoin-halving-explained/) on a fixed schedule. So when a miner chooses what to put in a block, fees are the part that varies, and the documentation is candid that it is ultimately up to each miner to choose the minimum fee they will accept.

Evidence: [Bitcoin Developer Guide: Transactions (Transaction Fees and Change)](https://developer.bitcoin.org/devguide/transactions.html)

## Calculate total fee from size and fee rate

At an illustrative 8 sat/vB, a 200-vbyte transaction pays 1,600 satoshis. A 400-vbyte transaction at the same rate pays 3,200. The payment’s bitcoin amount does not enter this multiplication.

Input types, signatures and outputs affect transaction weight and virtual size. Fee estimates change with the expected signed transaction, so compare total fee and rate separately. A higher rate can improve competitiveness without guaranteeing inclusion.

Evidence: [BIP141: Segregated Witness (Consensus layer)](https://raw.githubusercontent.com/bitcoin/bips/927b6de9915c9262615a6399de51b200f81e5aa4/bip-0141.mediawiki); [walletcreatefundedpsbt RPC](https://bitcoincore.org/en/doc/29.0.0/rpc/wallet/walletcreatefundedpsbt/); [Bitcoin Core mempool maintenance](https://raw.githubusercontent.com/bitcoin/bitcoin/v29.0/src/txmempool.cpp)

## The mempool is every node’s own waiting room, and no two are identical

A mempool is a node’s local set of accepted, unconfirmed transactions. Nodes can receive different transactions and apply different configurations, so an explorer reports its own observation rather than a single universal queue.

Bitcoin Core can remove entries when they are old or when the pool exceeds its configured size. The cited v29.0 implementation includes Expire and TrimToSize, with descendant handling and a rolling minimum fee after size-based eviction.

Eviction is not consensus cancellation. It does not revoke a signature or prove that every peer has forgotten the transaction. If its inputs remain spendable, someone may rebroadcast it, so an unrelated second payment can still create a duplicate payment.

Evidence: [Bitcoin Core mempool maintenance](https://raw.githubusercontent.com/bitcoin/bitcoin/v29.0/src/txmempool.cpp); [Bitcoin Developer Guide: Transactions (Transaction Fees and Change)](https://developer.bitcoin.org/devguide/transactions.html)

## Fees spike because demand moves and block space does not

Blocks have limited capacity, while pending demand changes. Miners choose which valid transactions to include, and dependent transactions can make package economics differ from an isolated transaction’s rate.

Relay floors, dynamic mempool minimums and incremental replacement requirements are different node policies. Their values depend on the software version and configuration; one historical sat/vB setting is not a permanent network-wide tariff.

A wallet can use observed conditions and a desired confirmation target to estimate a fee. The funded transaction’s actual virtual size determines the total fee, and the estimate does not reserve a place in a future block.

Evidence: [Bitcoin Developer Guide: Transactions (Transaction Fees and Change)](https://developer.bitcoin.org/devguide/transactions.html); [Bitcoin Core package policy](https://raw.githubusercontent.com/bitcoin/bitcoin/v29.0/doc/policy/packages.md); [walletcreatefundedpsbt RPC](https://bitcoincore.org/en/doc/29.0.0/rpc/wallet/walletcreatefundedpsbt/); [Bitcoin Core mempool maintenance](https://raw.githubusercontent.com/bitcoin/bitcoin/v29.0/src/txmempool.cpp); [bumpfee RPC](https://bitcoincore.org/en/doc/29.0.0/rpc/wallet/bumpfee/)

## Replace-by-fee: how a stuck transaction gets unstuck

RBF proposes a conflicting transaction spending at least one of the same outputs. The wallet must be able to construct and authorize it, and receiving nodes apply their replacement policies. Historical opt-in signaling in BIP-125 is not an immutable consensus requirement.

The cited Bitcoin Core 29.0 bumpfee RPC documents wallet restrictions and a required fee increase. Replacement rules depend on the implementation and version, and an accepted mempool replacement does not guarantee confirmation.

CPFP instead spends a suitable unconfirmed output with a child whose fee can improve the combined package rate. Either the recipient or a sender controlling change may be able to construct it. The parent must precede the child in the accepted chain, possibly within the same block.

Both techniques require the relevant spending authority, sufficient input value and supported wallet and relay behavior. Neither reverses a payment that is already confirmed in the accepted chain.

Evidence: [BIP125: Opt-in Full Replace-by-Fee Signaling](https://raw.githubusercontent.com/bitcoin/bips/927b6de9915c9262615a6399de51b200f81e5aa4/bip-0125.mediawiki); [bumpfee RPC](https://bitcoincore.org/en/doc/29.0.0/rpc/wallet/bumpfee/); [Bitcoin Core package policy](https://raw.githubusercontent.com/bitcoin/bitcoin/v29.0/doc/policy/packages.md); [Bitcoin Developer Guide: Transactions (Transaction Fees and Change)](https://developer.bitcoin.org/devguide/transactions.html)

## Questions

### Why is my Bitcoin transaction stuck?

A low fee rate is one possible cause. A transaction can also conflict, fail local policy, have unconfirmed dependencies or be unknown to the explorer. Mempools are local; eviction does not prove that every node has forgotten a signed transaction.

Evidence: [Bitcoin Developer Guide: Transactions (Transaction Fees and Change)](https://developer.bitcoin.org/devguide/transactions.html); [Mempool Replacements (doc/policy/mempool-replacements.md)](https://raw.githubusercontent.com/bitcoin/bitcoin/69142eacd1374925cc9e4ea736c21fcec16307d0/doc/policy/mempool-replacements.md)

### What does sat/vB mean?

Satoshis per virtual byte. A satoshi is the smallest unit of bitcoin, and a virtual byte is a transaction’s weight divided by four, rounded up to a whole virtual byte, the unit of block space defined by BIP141. The fee you pay is the rate multiplied by your transaction’s virtual size.

Evidence: [BIP141: Segregated Witness (Consensus layer)](https://raw.githubusercontent.com/bitcoin/bips/927b6de9915c9262615a6399de51b200f81e5aa4/bip-0141.mediawiki); [Mempool Replacements (doc/policy/mempool-replacements.md)](https://raw.githubusercontent.com/bitcoin/bitcoin/69142eacd1374925cc9e4ea736c21fcec16307d0/doc/policy/mempool-replacements.md)

### Can I cancel a Bitcoin transaction?

An unconfirmed spend can sometimes be replaced by a conflicting transaction under the receiving node’s policy. A wallet must control the needed inputs, and the replacement must meet applicable fee and other rules. Replacement is not guaranteed and does not reverse an already confirmed payment.

Evidence: [BIP125: Opt-in Full Replace-by-Fee Signaling](https://raw.githubusercontent.com/bitcoin/bips/927b6de9915c9262615a6399de51b200f81e5aa4/bip-0125.mediawiki); [Mempool Replacements (doc/policy/mempool-replacements.md)](https://raw.githubusercontent.com/bitcoin/bitcoin/69142eacd1374925cc9e4ea736c21fcec16307d0/doc/policy/mempool-replacements.md)

### How long does a transaction stay in the mempool?

Retention depends on the node’s software, configuration, fee conditions and transaction dependencies. Expiry or eviction removes a local entry; it does not cancel the signed transaction across the network, and a valid transaction may be rebroadcast.

Evidence: [Bitcoin Core mempool maintenance](https://raw.githubusercontent.com/bitcoin/bitcoin/v29.0/src/txmempool.cpp); [Bitcoin Developer Guide: Transactions (Transaction Fees and Change)](https://developer.bitcoin.org/devguide/transactions.html)

### Is there a minimum Bitcoin fee?

Relay minimums, dust thresholds and replacement requirements are node policies, not a universal per-payment consensus tariff. They can change by version and configuration. Consult the chosen node’s documentation; acceptance into its mempool still does not guarantee mining.

Evidence: [Mempool Replacements (doc/policy/mempool-replacements.md)](https://raw.githubusercontent.com/bitcoin/bitcoin/69142eacd1374925cc9e4ea736c21fcec16307d0/doc/policy/mempool-replacements.md); [Bitcoin Developer Guide: Transactions (Transaction Fees and Change)](https://developer.bitcoin.org/devguide/transactions.html)

## Claims and scope

### bitcoin-transaction-fees-and-mempool-quick-answer

A Bitcoin transaction fee is total input value minus total output value. Its fee rate divides that amount by the transaction’s virtual size, commonly expressed in satoshis per virtual byte. Each node maintains its own pending-transaction pool. Replacement and dependent-spend fee strategies have wallet and node-policy conditions and do not guarantee inclusion.

Scope: {"collection":"bitcoin","dataAsOf":null,"blockHeight":null}

### bitcoin-transaction-fees-and-mempool-fact-fee-unit

Fee unit: Satoshis per virtual byte (sat/vB); a virtual byte is the transaction’s weight divided by four, rounded up to a whole virtual byte

Scope: {"collection":"bitcoin","dataAsOf":null,"blockHeight":null}

### bitcoin-transaction-fees-and-mempool-fact-what-the-fee-is

What the fee is: The value of a transaction’s inputs minus the value of its outputs; the miner keeps the difference

Scope: {"collection":"bitcoin","dataAsOf":null,"blockHeight":null}

### bitcoin-transaction-fees-and-mempool-fact-block-capacity

Block capacity: At most 4,000,000 weight units per block; before SegWit the limit was 1,000,000 bytes

Scope: {"collection":"bitcoin","dataAsOf":null,"blockHeight":null}

### bitcoin-transaction-fees-and-mempool-fact-default-mempool-size

Default mempool size: 300 megabytes in Bitcoin Core, a cap introduced in version 0.12.0 on 23 February 2016

Scope: {"collection":"bitcoin","dataAsOf":null,"blockHeight":null}

### bitcoin-transaction-fees-and-mempool-fact-default-expiry

Default expiry: Bitcoin Core’s documented default expiry is 336 hours; eviction, rebroadcast and configuration affect what any particular node retains

Scope: {"collection":"bitcoin","dataAsOf":null,"blockHeight":null}

### bitcoin-transaction-fees-and-mempool-fact-opt-in-replace-by-fee

Opt-in replace-by-fee: Specified in BIP125, dated 4 December 2015, and shipped in Bitcoin Core 0.12.0

Scope: {"collection":"bitcoin","dataAsOf":null,"blockHeight":null}

### bitcoin-transaction-fees-and-mempool-fact-full-replace-by-fee

Full replace-by-fee: Default in Bitcoin Core from version 28.0; a transaction no longer has to signal that it can be replaced

Scope: {"collection":"bitcoin","dataAsOf":null,"blockHeight":null}

### bitcoin-transaction-fees-and-mempool-fact-fee-estimator

Fee estimator: Bitcoin Core’s estimatesmartfee targets confirmation within 1 to 1,008 blocks

Scope: {"collection":"bitcoin","dataAsOf":null,"blockHeight":null}

## Sources

- [Bitcoin Developer Guide: Transactions (Transaction Fees and Change)](https://developer.bitcoin.org/devguide/transactions.html) — Bitcoin Project, developer.bitcoin.org. States that fees are paid by transaction size, that fees per byte follow demand for block space, that each miner sets its own minimum, that the fee is whatever input value is not assigned to an output, and gives the 1,000-satoshi minimum since version 0.9 and the 546-satoshi dust threshold. Locator: States that fees are paid by transaction size, that fees per byte follow demand for block space, that each miner sets its own minimum, that the fee is whatever input value is not assigned to an output, and gives the 1,000-satoshi minimum since version 0.9 and the 546-satoshi dust threshold.. Retrieved: 2026-10-02T14:48:40.568452+00:00.
- [BIP125: Opt-in Full Replace-by-Fee Signaling](https://raw.githubusercontent.com/bitcoin/bips/927b6de9915c9262615a6399de51b200f81e5aa4/bip-0125.mediawiki) — Bitcoin Improvement Proposals, GitHub. Specifies nSequence signaling for replaceable transactions and the replacement rules, and records that Satoshi’s original replacement mechanism was removed in version 0.3.12. Locator: Specifies nSequence signaling for replaceable transactions and the replacement rules, and records that Satoshi’s original replacement mechanism was removed in version 0.3.12.. Retrieved: 2026-10-02T15:04:16.848832+00:00.
- [Mempool Replacements (doc/policy/mempool-replacements.md)](https://raw.githubusercontent.com/bitcoin/bitcoin/69142eacd1374925cc9e4ea736c21fcec16307d0/doc/policy/mempool-replacements.md) — Bitcoin Core, GitHub. Lists the current replacement rules (absolute fee, incremental relay feerate of 0.1 sat/vB, 100-cluster limit), states that signaling is no longer required, and dates opt-in RBF to 0.12.0, configurable full RBF to 24.0 and default full RBF to 28.0. Locator: Lists the current replacement rules (absolute fee, incremental relay feerate of 0.1 sat/vB, 100-cluster limit), states that signaling is no longer required, and dates opt-in RBF to 0.12.0, configurable full RBF to 24.0 and default full RBF to 28.0.. Retrieved: 2026-10-02T15:04:16.899476+00:00.
- [Bitcoin Core 0.12.0 release notes](https://bitcoincore.org/en/releases/0.12.0/) — Bitcoin Core, bitcoincore.org. Introduces the 300 MB default mempool limit, eviction of the lowest-feerate package with the minimum relay feerate rising to match, the 1,000 satoshis per kB initial minimum, and opt-in replace-by-fee; published 23 February 2016. Locator: Introduces the 300 MB default mempool limit, eviction of the lowest-feerate package with the minimum relay feerate rising to match, the 1,000 satoshis per kB initial minimum, and opt-in replace-by-fee; published 23 February 2016.. Retrieved: 2026-10-02T14:48:42.311635+00:00.
- [Increase mempool expiry time to 2 weeks (pull request #9312)](https://github.com/bitcoin/bitcoin/pull/9312) — Bitcoin Core, GitHub. Raises the default mempool expiry from 72 hours to 336 hours; merged 5 January 2017. Locator: Raises the default mempool expiry from 72 hours to 336 hours; merged 5 January 2017.. Retrieved: 2026-10-02T14:48:44.432345+00:00.
- [estimatesmartfee RPC reference (Bitcoin Core 27.0)](https://bitcoincore.org/en/doc/27.0.0/rpc/util/estimatesmartfee/) — Bitcoin Core, bitcoincore.org. Describes the fee estimator: the approximate fee rate needed to begin confirmation within a target of 1 to 1,008 blocks, with economical and conservative modes. Locator: Describes the fee estimator: the approximate fee rate needed to begin confirmation within a target of 1 to 1,008 blocks, with economical and conservative modes.. Retrieved: 2026-10-02T14:48:42.388084+00:00.
- [BIP141: Segregated Witness (Consensus layer)](https://raw.githubusercontent.com/bitcoin/bips/927b6de9915c9262615a6399de51b200f81e5aa4/bip-0141.mediawiki) — Bitcoin Improvement Proposals, GitHub. Defines block weight as base size times three plus total size with a 4,000,000 limit, virtual size as weight divided by four, rounded up to a whole virtual byte rounded up, and records the earlier 1,000,000-byte block limit. Locator: Defines block weight as base size times three plus total size with a 4,000,000 limit, virtual size as weight divided by four, rounded up to a whole virtual byte rounded up, and records the earlier 1,000,000-byte block limit.. Retrieved: 2026-10-02T15:04:13.421045+00:00.
- [walletcreatefundedpsbt RPC](https://bitcoincore.org/en/doc/29.0.0/rpc/wallet/walletcreatefundedpsbt/) — Bitcoin Core. Input selection, fee units, change output, selected inputs and transaction funding. Locator: Arguments and result fields. Retrieved: 2026-10-02T17:03:40.827Z.
- [Bitcoin Core mempool maintenance](https://raw.githubusercontent.com/bitcoin/bitcoin/v29.0/src/txmempool.cpp) — Bitcoin Core. Node-local expiry and size-based eviction of unconfirmed transactions. Locator: CTxMemPool::Expire; CTxMemPool::TrimToSize. Retrieved: 2026-10-02T17:55:16.998Z.
- [Bitcoin Core package policy](https://raw.githubusercontent.com/bitcoin/bitcoin/v29.0/doc/policy/packages.md) — Bitcoin Core. Package fee accounting and policy for dependent transaction admission. Locator: Package Mempool Acceptance Rules; Package Fees and Feerate. Retrieved: 2026-10-02T17:21:46.897Z.
- [bumpfee RPC](https://bitcoincore.org/en/doc/29.0.0/rpc/wallet/bumpfee/) — Bitcoin Core. Wallet-assisted replacement and the required fee and transaction conditions. Locator: Arguments and result fields. Retrieved: 2026-10-02T17:03:40.979Z.

## Revision history

- 2026-09-23: Initial Bitcoin encyclopedia entry at this permanent URL.
- 2026-10-02: Corrected scope or wording: weight divided by four Corrected scope or wording: rounded up to a whole virtual byte, rounded up Corrected scope or wording: so today the network treats any unconfirmed transaction as replaceable. Corrected key fact: Default expiry Corrected FAQ: Why is my Bitcoin transaction stuck? Corrected FAQ: Can I cancel a Bitcoin transaction? Corrected FAQ: Is there a minimum Bitcoin fee?
- 2026-10-02: Added reusable claims, explicit source locators, and matching Markdown and JSON. This publishing change does not itself establish factual verification.
- 2026-10-02: Expanded explanation: Calculate total fee from size and fee rate. Worked examples are illustrative; source checks and independent verification are recorded separately.

## Cite this entry

Degrees of Satoshi editorial project. “Bitcoin transaction fees and the mempool: how fees are set and why they spike.” Published 2026-09-23; updated 2026-10-02. https://degreesofsatoshi.com/encyclopedia/bitcoin-transaction-fees-and-mempool/
