Skip to content
Intermediate guide

Bitcoin UTXOs explained: inputs, outputs and change

What a Bitcoin UTXO is, how inputs spend earlier outputs, why a change output appears and how the fee follows from inputs minus outputs.

7 min readBitcoinUTXOTransactions

A Bitcoin UTXO is an unspent transaction output: an amount of bitcoin that an earlier transaction created and that no later transaction has spent yet. Every transaction consumes existing outputs through its inputs and creates new outputs in their place.

The balance your wallet shows is therefore a sum, not an account the protocol keeps for you. A wallet reporting 10,000 satoshis may hold them in one output or spread across several (Bitcoin developer guide: transactions).

What is a Bitcoin UTXO?

Every transaction output holds two things: an amount and a set of conditions. The amount is stored in satoshis, the smallest unit the protocol records; one BTC is 100 million of them. The conditions sit in what the reference documentation calls the pubkey script, and anyone who wants to spend the output later has to satisfy them. In the familiar case that means proving you hold the private key behind an address, but a script can just as well demand several signatures (Bitcoin transaction reference, section TxOut).

An output counts as unspent until an input claims it. Once a valid transaction spends it and that transaction is in the blockchain, the output is spent for good.

Outputs versus account balances

A bank account is one number that goes up and down. Bitcoin behaves more like a pocket full of banknotes in odd denominations. Receive three payments and you normally hold three separate outputs, not one larger balance, and each keeps its own amount and its own conditions until it is spent.

An output is not a person, though, and neither is an address. One wallet can control thousands of outputs across many addresses, while a service holding coins for customers may keep many people's funds behind a few. The UTXO model describes pieces of value and their spending rules, not who owns them.

How do transaction inputs spend UTXOs?

An input contains no bitcoin of its own. It is a pointer to an output that already exists, plus the data needed to unlock it.

A previous transaction ID and output index

For the pointer to be unambiguous, an input names two things: the transaction ID (txid) of the transaction that created the output, and the output's position inside that transaction. The position is the output index, usually called vout, and counting starts at 0, so the second output of a transaction has index 1. You'll often see the pair written as txid:vout (Bitcoin transaction reference, sections TxIn and Outpoint).

Alongside the pointer, the input supplies data that satisfies the conditions of the output it spends. For the classic single-key output the developer guide walks through, that is a signature and the matching public key. Other output types, including newer formats, can ask for different data. Each node checks the match independently, and if the conditions aren't met, the whole transaction is invalid (Bitcoin developer guide: transactions).

What happens to a spent output?

It is used up, entirely and once. A later transaction that references the same output again would be a double spend, and nodes reject it (Bitcoin developer guide: block chain). The old output is never edited or reduced. To move part of its value, a transaction consumes all of it and creates new outputs that divide the amount.

One kind of transaction breaks the pattern of inputs pointing at earlier outputs: the coinbase transaction. Miners create it in each block, it has no previous output to spend, and its outputs pay out the block subsidy plus the fees of the block's other transactions (Bitcoin transaction reference, section TxOut). Everything below is about ordinary, non-coinbase transactions.

A hypothetical two-input transaction

The numbers here are invented to keep the arithmetic readable. They are not a fee suggestion and say nothing about current network conditions.

Your wallet holds two UTXOs, one worth 0.7 BTC and one worth 0.3 BTC, and you want to pay someone 0.25 BTC. The wallet's coin selection picks both outputs. It could have used the 0.3 BTC output alone; wallets follow their own selection rules, and two inputs simply make the example more instructive.

Follow the amounts

The transaction has two inputs, one referencing each of your outputs, so 1.0 BTC goes in. It creates two outputs: 0.25 BTC locked to the recipient's address and 0.7499 BTC locked to an address your wallet controls. That second one is the change. Together the outputs hold 0.9999 BTC.

ItemBTCSatoshis
Input A (spends the 0.7 BTC output)0.770,000,000
Input B (spends the 0.3 BTC output)0.330,000,000
Sum of inputs1.0100,000,000
Payment output0.2525,000,000
Change output0.749974,990,000
Sum of outputs0.999999,990,000
Fee: inputs minus outputs0.000110,000

Once the transaction is confirmed, your two old UTXOs are spent. Two new outputs exist in their place, and as long as nobody spends them, they are UTXOs themselves: the recipient can spend the 0.25 BTC output, your wallet the 0.7499 BTC one.

An output's index follows only from its position in the transaction (Bitcoin developer guide: transactions), and whoever builds the transaction chooses that order. The payment might sit at index 0 or 1, and so might the change; no protocol rule puts the recipient first.

Why is there a change output?

Because a UTXO has to be spent in full. As the developer guide notes, few people have UTXOs that exactly match the amount they want to pay, so most transactions include a change output (Bitcoin developer guide: transactions, section Transaction Fees And Change). Without one, the entire surplus becomes fee. Drop the change output from the example and the miner could claim 0.75 BTC.

Change is a regular output, not a refund

The word suggests coins handed back at a checkout, but nothing comes back. The change output is a new output in the same transaction, structured exactly like the payment output, and the protocol has no field that marks it as change. Your wallet recognizes it because it holds the key. The blockchain does not label it.

Change can be sent to the address the spent coins came from, but there's no technical requirement to do so. The developer guide strongly recommends a new address instead, because reusing addresses makes it easier for others to link your payments (Bitcoin developer guide: transactions, section Avoiding Key Reuse). Wherever it goes, change can later be spent like any other UTXO.

Where is the transaction fee?

Not in an output. In an ordinary transaction, the fee is the value the inputs bring in that the outputs don't pay out. A non-coinbase transaction whose outputs add up to more than its inputs is rejected. When the inputs are larger, the miner whose block includes the transaction may claim the difference as a fee (Bitcoin developer guide: block chain). There's no line in the transaction that says "fee". It falls out of the subtraction.

A frequent misreading is to subtract only the payment from the inputs. In the example that gives 1.0 − 0.25 = 0.75 BTC, which is wrong by a long way. The change output has to come off too: 1.0 − 0.25 − 0.7499 = 0.0001 BTC.

How big the fee ought to be is a separate question. Fees are priced by the transaction's size, not by the amount sent (Bitcoin developer guide: transactions). Since the SegWit upgrade, that size is counted in virtual bytes (vB) rather than raw bytes (BIP 141), and every extra input or output adds to it. Fee rates and confirmation times are a topic of their own.

How do you read inputs and outputs on a block explorer?

A block explorer displays a transaction close to the way the protocol stores it. Layouts differ, but you'll usually find:

  • the txid of the transaction
  • on the input side, the outputs being spent, each with its txid:vout reference and amount
  • on the output side, every new output with its index, amount and the address or script it is locked to
  • for each new output, whether it has been spent since

What the page doesn't show matters just as much. It doesn't say which output is change. Observers often guess, for instance by looking for an output that returns to an address seen among the inputs, but a wallet that sends change to a fresh address defeats that guess easily. It doesn't say who controls any of the addresses. And it doesn't say whether anything was sold: moving coins between two of your own wallets produces the same structure as paying a stranger.

On-chain metrics are built from exactly these spent and unspent outputs. The on-chain analysis basics guide shows how analysts work with the UTXO set as a whole, and Bitcoin SOPR explained covers a ratio calculated from spent outputs.

What does the UTXO model not tell you?

The chain records structure: which outputs were spent and created, their amounts and their conditions. Identity, intent and price aren't in it. An on-chain movement doesn't prove a change of ownership and carries no purchase price; any dollar value attached to an output comes from a separate price history. Whether a transaction matters for taxes is a legal question a transaction graph can't settle.

For background on the network itself, what is Bitcoin covers the basics. CoinVett's Bitcoin page puts BTC in its market context; it is not a transaction explorer.

When you look at a transaction, keep the accounting straight. Every input retires an earlier output completely, every output is a new candidate UTXO, and change is just one of those outputs. The fee is what remains after all outputs, change included, are subtracted from the inputs.

Notice: The amounts in the worked example are hypothetical and not a fee recommendation; the sources are linked in the text. For information only, not financial advice.

Frequently asked questions

Can a Bitcoin UTXO be partially spent?

No. An input always consumes the output it references in full. To send only part of the amount, the transaction creates a payment output and usually a new change output for the remainder, minus the fee.

Is the change output always the second output or sent to my original address?

No. The wallet building the transaction decides the order of the outputs, so change can sit at any index. It can also go to a new address, which the Bitcoin developer guide recommends. From the transaction alone, an outside observer can't reliably tell which output is change.

Where is the fee in a Bitcoin transaction?

In ordinary non-coinbase transactions there is no fee output. The fee is the sum of the inputs minus the sum of all outputs, change included, and the miner of the block can claim it. In the hypothetical example, 1.0 BTC in and 0.9999 BTC out leave a fee of 0.0001 BTC.

Related coins to explore

Want to go deeper? Open these coin pages to see market data and AI insights.

Related guides

These guides cover similar topics and make good next reads.

Ready to put this into practice?

The Crypto Profile Finder helps you explore an educational profile category based on your answers.

Continue learning

Crypto categories explained: what a sector label actually means

Next guide →
Editorial Team

CoinVett Team

The CoinVett editorial team combines crypto market expertise with AI-powered analysis tools.

This website only uses technically necessary cookies. No tracking, no analytics.