Foundations · Bitcoin Knowledge Center
The UTXO Model
Bitcoin does not store account balances. It tracks unspent transaction outputs (UTXOs): discrete chunks of bitcoin that each transaction consumes and replaces.
Why it matters
A banking app shows one number: your balance. It is natural to assume Bitcoin works the same way, with a balance stored next to each address. It does not.
Bitcoin’s ledger holds no balances at all. It holds individual pieces of bitcoin called unspent transaction outputs, or UTXOs. This explains several things that otherwise look strange: why a payment often sends money back to the sender, why fees depend on a transaction’s size instead of its amount, and why reusing addresses affects privacy.
How it works
INPUTS (SPENT)
Two outputs Ana received earlier. Total 0.8 BTC.
- UTXO of 0.5 BTC
- UTXO of 0.3 BTC
- Both are used up completely
OUTPUTS (CREATED)
Two new outputs. Total 0.799 BTC.
- 0.6 BTC locked to Ben
- 0.199 BTC locked to Ana as change
- The missing 0.001 BTC is the fee
Every Bitcoin transaction has two lists:
- Inputs point to outputs of earlier transactions and prove the right to spend them.
- Outputs create new pieces of bitcoin, each with an amount and a condition for spending it.
An output that no later transaction has used as an input is unspent. The complete collection of these is the UTXO set. It is the current state of the ledger, and every full node keeps a copy.
In plain words
Think of physical cash. Your wallet does not contain “80 units”. It contains particular notes, perhaps a 50 and a 30. To pay 60, you hand over both notes and receive change. You cannot tear a note in half. UTXOs behave like those notes, except that each one can have any value and the change comes back as a freshly printed note.
Three rules follow from this structure.
An output is spent whole
A UTXO cannot be partly spent. If Ana owns a single output of 0.5 bitcoin and wants to pay 0.1, the transaction consumes the full 0.5 and creates two outputs: 0.1 for the recipient and the remainder back to herself. The second one is the change output.
The fee is the difference
A transaction does not state its fee. Whatever the inputs contain beyond the total of the outputs is collected by the miner who includes the transaction in a block.
Each output carries a lock
An output is not simply assigned to a person. It contains a small script that sets the condition for spending it, most commonly “provide a valid signature for this public key”. The input that later spends it must satisfy the condition. This is how keys and addresses connect to coins.
The life of an output
- CreatedA transaction makes an output with an amount and a lock.
- UnspentAfter confirmation it sits in the UTXO set.
- ReferencedA new transaction names it as an input and supplies a signature.
- SpentIt leaves the UTXO set for good. New outputs replace it.
When a node receives a transaction, it checks each input against its UTXO set. If the referenced output is there and the signature is valid, the input is acceptable. If the output is missing, it either never existed or has already been spent, and the transaction is rejected. This lookup is how Bitcoin prevents double spending.
A wallet’s “balance” is a convenience. The software scans for outputs that its keys can unlock and adds them up.
The hypothetical payment, step by stepHypothetical illustration
Ana’s wallet controls two UTXOs: one of 0.5 bitcoin and one of 0.3 bitcoin. She wants to pay Ben 0.6 bitcoin. All numbers are made up.
- Neither output is large enough alone, so the wallet selects both. Inputs: 0.5 + 0.3 = 0.8.
- Output 1: 0.6 to Ben’s address.
- The wallet sets a fee of 0.001.
- Output 2, the change: 0.8 - 0.6 - 0.001 = 0.199, sent to a new address that Ana’s own wallet controls.
After confirmation, the two old UTXOs no longer exist. Ana holds one UTXO of 0.199. Ben holds a new UTXO of 0.6.
If step 4 were left out, the outputs would total 0.6 and the fee would be 0.8 - 0.6 = 0.2 bitcoin. Wallet software adds the change automatically. Hand-built transactions have lost funds exactly this way.
Going deeper
UTXOs and accounts
| Aspect | UTXO model | Account model |
|---|---|---|
| What the ledger stores | A set of unspent outputs | A balance for each account |
| A payment | Consumes outputs, creates new ones | Subtracts from one balance, adds to another |
| A wallet's balance | Calculated by adding up its outputs | Read directly from the account |
| Typical example | Bitcoin | Ethereum |
Ethereum and many other networks use an account model, described in the Ethereum overview. Neither model is simply better. The UTXO model makes it easy to verify transactions independently and in parallel, since each one touches only specific outputs. The account model is more convenient for programs that need shared, changing state.
Why UTXO count affects fees
Each input adds data to a transaction, and fees are charged per unit of data. A payment that has to gather twenty small UTXOs is much larger, and therefore costlier, than one that spends a single UTXO of the same total value.
Two consequences:
- Dust. A very small UTXO can cost more in fees to spend than it is worth.
- Consolidation. Combining many small outputs into one is a transaction like any other and pays a fee itself.
Privacy effects
All inputs and outputs are public. When a transaction spends several inputs together, observers commonly assume one person controls them all. Change outputs can sometimes be identified too. Analysts use these patterns to group addresses, which is one reason Bitcoin is described as pseudonymous. Wallets normally create a fresh address for each change output to limit linking.
Coins with no input
The first transaction in every block has no earlier output to spend. It creates the miner’s reward: the subsidy plus the block’s fees. Every bitcoin in existence traces back through a chain of transactions to one of these.
What it does NOT mean
- A UTXO is not a coin with a fixed identity. Outputs are destroyed and recreated at every transaction. No serial number follows a bitcoin around.
- An address does not “contain” a balance in the ledger. Explorers and wallets add up outputs to display one.
- Change is not a second payment to a stranger. It is the sender’s own money returning, usually to a new address in the same wallet.
- A larger amount does not mean a larger fee. Fees track the data size of the transaction, which depends mainly on the number of inputs and outputs.
- The model does not make transactions private. Every input and output is visible to everyone.
Common misunderstandings
- Panicking at the change output. A block explorer may show the whole UTXO leaving an address, with most of it going to an unfamiliar address. That is normally change.
- Assuming many small receipts cost nothing. Each one becomes a separate UTXO that adds to the fee when it is spent.
- Building transactions by hand without checking the totals. Any amount not assigned to an output becomes the fee.
- Expecting Bitcoin to behave like an account system. Ideas such as “sending from a balance” are wallet abstractions.
Limits and open questions
- The UTXO set grows as more outputs are created, and every full node must store it. Its size is a long-running concern for the cost of running a node.
- Outputs too small to spend economically may remain in the set indefinitely.
- The model makes complex shared-state applications harder to build than on account-based chains.
- Coin selection by wallets involves trade-offs between fees and privacy that have no single correct answer.
Key takeaway
Bitcoin tracks unspent outputs, not balances. A transaction consumes whole outputs, creates new ones, returns change to the sender, and leaves the difference as the fee.
Sources and further reading
- Bitcoin: A Peer-to-Peer Electronic Cash System (opens in a new tab), Satoshi Nakamoto (2008). Sections 2 and 9 describe transactions and combining and splitting value
- Mastering Bitcoin, Andreas M. Antonopoulos. Chapter on transactions, inputs and outputs
- Transactions (Bitcoin Developer Guide) (opens in a new tab), Bitcoin Project. Each output waits as an unspent transaction output until a later input spends it; change outputs return surplus to the spender