21Relay
Intermediate curriculum
Lesson 310 minReviewed July 2026

Transaction Fees

Learn where fees come from, why fee rate matters more than the bitcoin amount being sent, and how wallets estimate confirmation priority.

Learning outcomes

By the end of this lesson, you should be able to

  • The fee equals total inputs minus total outputs.
  • Fee rate measures cost relative to transaction size.
  • Sending more bitcoin does not automatically make a transaction larger.
  • Fee estimates respond to mempool demand and are not guarantees.
1

Fees are the input-output difference

A Bitcoin transaction has no separate fee field. The fee is total input value minus total output value.

Nodes reject transactions that create value, so a wallet balances recipient value, change and the intended fee before signing.

2

Block space is priced by transaction weight

Miners compare transactions using fee rate, commonly shown as satoshis per virtual byte. A larger transaction needs a larger absolute fee to offer the same rate.

Payment amount does not determine size. Input count, output count and script type matter more.

3

Demand changes estimates

When many transactions compete for block space, higher fee rates tend to confirm sooner. During quieter periods, lower rates may be sufficient.

Estimates are predictions rather than guarantees. Compatible wallets may offer replace-by-fee or child-pays-for-parent tools when more urgency is required.

Visual recap

From transaction values to fee rate

The wallet calculates a fee, measures transaction size and chooses a rate for current demand.

01

Total inputs

02

Minus outputs

03

Transaction fee

04

Divide by vbytes

05

Fee rate

06

Priority

Key vocabulary

Terms worth knowing

sat/vB
Satoshis paid per virtual byte of transaction size.
Package
Related unconfirmed transactions considered together for relay or mining fee evaluation.
Fee bump
A method such as RBF or CPFP used to improve the effective incentive for confirmation.

Worked example

A fee estimate changes before broadcast

A wallet prepares a 140-vB transaction at 5 sat/vB. New demand arrives and higher-fee transactions fill the near-term block range.

  1. 1Calculate the original 700-sat fee
  2. 2Compare the chosen rate with the current mempool distribution
  3. 3Decide whether the payment is time-sensitive
  4. 4Check whether RBF is enabled before broadcast

A fee estimate is a probabilistic forecast, not a promise from miners or the protocol.

Common misconceptions

What learners often get wrong

Misconception

The amount being sent determines the miner fee.

More accurate

Fee pressure primarily depends on transaction virtual size and the selected fee rate, not the payment value.

Misconception

The highest displayed fee is always necessary.

More accurate

The appropriate rate depends on current demand, desired confirmation target and available fee-bump options.

Try it yourself

Calculate three fee choices for a 180-vB transaction.

  • Multiply size by 2 sat/vB
  • Repeat at 8 sat/vB
  • Repeat at 25 sat/vB
  • Explain when each target might be reasonable

Use fictional values and public information only. Never enter seed words, private keys or other wallet secrets into a learning exercise.

Key takeaways

  • The fee equals total inputs minus total outputs.
  • Fee rate measures cost relative to transaction size.
  • Sending more bitcoin does not automatically make a transaction larger.
  • Fee estimates respond to mempool demand and are not guarantees.

Lesson recap

Check what you learned

Reveal each model answer, then honestly mark whether you understood it or need another review.

1 of 3

Recall

Which usually matters more to miners: payment value or fee rate?

References

Further reading

Lesson progress

Loading progress...

Rate this lesson

Was this lesson helpful?

No name or financial information is collected.

Found inaccurate or outdated information? Report a correction