How a Bitcoin transaction really works (UTXOs)

Your "balance" is really a pile of digital banknotes.

Builder ยท 10 min ยท Updated 2026-11-08

๐Ÿ’ก Paying with banknotes and getting change

You want to buy a โ‚น300 shirt but only have a โ‚น500 note. You can't tear the note โ€” you hand over the whole โ‚น500 and get โ‚น200 back. Bitcoin works the same way: your wallet holds separate "notes" called UTXOs (unspent transaction outputs). To pay, you spend whole notes and send the leftover back to yourself as change โ€” minus a small tip for the miner.

Balances are an illusion โ€” outputs are real

The Bitcoin ledger doesn't store "Alice: 0.05 BTC". It stores outputs: chunks of bitcoin locked to a key. Your wallet adds up the unspent ones (UTXOs) and shows you a balance.

Anatomy of a transaction

  • Inputs โ€” references to UTXOs you are spending, each proven with your signature.
  • Outputs โ€” new UTXOs: one for the recipient, usually one "change" output back to you.
  • Fee โ€” not written as a field! It is simply sum(inputs) โˆ’ sum(outputs), and the miner keeps it.

Fees depend on size, not amount

Miners prioritise transactions paying more satoshis per virtual byte (sat/vB). Sending $10 or $10 million costs the same fee if the transaction is the same size. Using many small UTXOs makes a transaction bigger โ€” and costlier.

From mempool to confirmation

  1. Your signed transaction is broadcast and waits in nodes' mempool (waiting room).
  2. A miner picks the highest-paying transactions that fit in a block.
  3. Once in a block: 1 confirmation. Each new block on top adds another.
โš ๏ธ

The forgotten-change disaster

If you build a transaction by hand and forget the change output, the entire leftover becomes the miner's fee. Wallet software prevents this โ€” another reason never to experiment with real funds.

๐Ÿงฎ Practical example: Alice pays Bob 0.01 BTC

Key takeaways

  • Wallet balance = sum of your UTXOs.
  • Inputs are spent whole; leftover returns as change.
  • Fee = inputs โˆ’ outputs, priced in sat/vB.
  • Confirmations accumulate as blocks stack on top.

Education only โ€” not financial advice.