> For the complete documentation index, see [llms.txt](https://docs.leather.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.leather.io/learn/bitcoin-transaction-fee.md).

# Bitcoin Transaction Fees

Bitcoin transaction fees pay miners to include your transaction. What sets the fee, and how Leather suggests one.

A Bitcoin transaction fee is the amount of bitcoin you pay a miner to include your transaction in a block. It is the difference between what the transaction's inputs hold and what its outputs pay.

## Why fees exist

Miners earn the block subsidy (new bitcoin) and the fees of the transactions in their block. The subsidy halves about every four years, so fees become a larger share of what pays for the network's security. See [What is Bitcoin Halving?](/learn/bitcoin-halving.md).

## What sets the fee

* **Size:** a fee is priced per virtual byte (sat/vB). A transaction with more inputs and outputs is larger and costs more.
* **Demand:** a block holds at most 4 million weight units. When many transactions compete, the fee rate needed to get into the next block rises.
* **Urgency:** a higher fee rate usually confirms sooner.

Address types affect size: Native SegWit and Taproot inputs are smaller than legacy inputs.

## Fees on Stacks

Stacks transactions pay their fee in STX, to Stacks miners. A Stacks transaction does not pay a Bitcoin fee.

## Fees in Leather

Leather suggests three fee options from current network rates and lets you set a custom fee. If a Bitcoin transaction waits too long, you can raise its fee. See [Configure Transaction Fees](/transactions/configure-transaction-fees.md) and [Increase Transaction Fee](/transactions/increase-fee.md).
