Skip to content
DonateБГ

Beginners

Outputs

A bitcoin transaction output is a batch of coins with a lock on it. Learn how outputs are spent whole, how change works and where fees come from.

By Dimitar Zurnov · Updated 4 Nov 2026
Adapted from Learn Me a Bitcoin by Greg Walker.

A bitcoin transaction output is a batch of bitcoin with a lock on it, and the lock says who is allowed to spend that batch. A transaction spends existing outputs and creates new ones, and once an output has been spent, it can never be spent again.

Your wallet shows you a single balance, but Bitcoin does not keep one pot of coins that it adds to and takes from. Instead, it keeps outputs, and your balance is simply the total of the outputs you are able to spend. The easiest way to see how this works is to follow a few payments from start to finish, because each one shows a different part of the system.

Where do new outputs come from?

New bitcoin enters the system through mining, when a miner adds a new block to the chain. The first transaction in every block is special, because it pays the block reward to an address the miner chooses. That is why it is called the coinbase transaction. It creates new coins rather than spending old ones, so it has no earlier output to spend.

Since block 840,000 in April 2024, the reward has been 3.125 BTC, so the coinbase transaction creates a single output of 3.125 BTC. A miner cannot spend that output straight away, because coinbase outputs must wait 100 blocks, which is about 17 hours on average. The reward in the very first block, block 0, can never be spent at all.

What happens when you spend an output?

Suppose you mine a block, collect the 3.125 BTC reward, and wait out the 100 blocks that the rules require. Now you want to pay a shop 1 BTC for something you need, and you want the payment to be recorded on the chain.

You might expect to cut 1 BTC off the output and keep the rest for yourself, since that is how cash works in most people's minds. Bitcoin does not work that way, because an output is always spent whole, and you cannot take a part of one.

So the transaction spends the entire 3.125 BTC output and creates two new outputs from it. The first is 1 BTC, locked to the shop's address. The second is 2.125 BTC, locked to an address that you control, and it is known as your change.

A 3.125 BTC output is spent whole and split into a 1 BTC payment and 2.125 BTC of change. 3.125 spent whole 1 to the shop 2.125 your change 1 + 2.125 = 3.125 BTC. No fee in this example.
The spent output is gone. The two new outputs are the only spendable ones left.

Afterwards, the shop holds a new 1 BTC output, and you hold a new 2.125 BTC output. The original 3.125 BTC output is used up for good, and it cannot be spent a second time.

This method can seem roundabout, because the end result looks the same as moving 1 BTC from one account to another. The outputs system is built this way because software can check it simply, one batch at a time, which makes the whole network easier to trust.

What does a transaction do with outputs?

A transaction does three things, and each one follows from the way outputs work:

  • It takes existing outputs and uses them as its inputs.
  • It creates new outputs from those inputs, with amounts that add up to the inputs, minus any fee.
  • It locks each new output to an address, so that only the holder of the matching key can spend it later.

How do several outputs make one payment?

Your address may hold several outputs at once, and a single payment can draw on more than one of them. Imagine a shop with four outputs: 1 BTC, 0.5 BTC, 2 BTC and 1 BTC. The shop wants to buy a machine that costs 4.2 BTC, but none of its outputs is large enough on its own to cover that price.

So the shop gathers several of its outputs and spends them together as inputs. Between them, the four outputs hold 4.5 BTC. The transaction then creates two new outputs from that total: one sends 4.2 BTC to the seller, and the other returns 0.3 BTC to the shop as change.

Four outputs, totalling 4.5 BTC, are spent together to create a 4.2 BTC payment and 0.3 BTC of change. 1 0.5 2 1 One transaction 4.5 BTC in 4.2 BTC to the seller 0.3 BTC change Spent inputs can never be spent again.
Each input is spent whole. Only the two new outputs can be spent next.

Which outputs you choose does not change the result, as long as their combined total covers the payment. Wallets make this choice automatically, so in practice you rarely need to think about it.

What is a UTXO?

An output that has not been spent yet is called a UTXO, which stands for unspent transaction output. Your balance is simply the sum of your UTXOs, and spent outputs do not count toward it at all.

Where does the transaction fee come from?

A fee is whatever is left over after the outputs are subtracted from the inputs. The gap is not sent to anyone, and no output is created for it. Instead, the gap goes to whichever miner includes the transaction in a block, because that miner can claim it as part of the block reward.

This is why a fee helps your transaction get mined sooner. Transactions wait in the memory pool until a miner picks them up. Miners earn more from transactions that pay more, so they tend to include those first. Fees are usually quoted as a fee rate, which is the number of satoshis paid for each virtual byte of the transaction.

Take the shop's payment again, and suppose the change is 0.29998 BTC instead of 0.3 BTC. The outputs now total 4.49998 BTC. The remaining gap of 0.00002 BTC, or 2,000 satoshis, is the fee.

Inputs total 4.5 BTC, outputs total 4.49998 BTC, and the 0.00002 BTC gap is the fee. Inputs: 4.5 BTC 4.2 BTC to the seller 0.29998 BTC change fee 0.00002 BTC 450,000,000 - 449,998,000 = 2,000 sats
The gap is left for the miner. No output is created for it.

If you build a transaction by hand and forget to add a change output, the whole leftover amount becomes the fee. A wallet avoids this mistake, because it adds the change output for you automatically.

What does a real output look like?

Block 170 holds two transactions. The first is the coinbase transaction, which pays the miner. The second is one of the first payments between two people. It spends a 50 BTC output that was created in block 9, and it creates two new outputs: 10 BTC to Hal Finney, and 40 BTC of change back to the sender. The outputs are locked to public keys, which was the way early payments worked, rather than to addresses.

You can open block 170 in our explorer and see those outputs for yourself. The transaction has no fee, because the inputs and the outputs add up to exactly 50 BTC.

Next, locks explains how each output is locked, so that only its owner can spend it.

In this section: Beginners

All of Bitcoin from zero

Something look wrong? Tell us