A Bitcoin transaction spends existing coins (inputs) and locks new ones to their next owners (outputs). See how it works with a real example.
Spend old coins, create new ones
A Bitcoin transaction is a small data message that says: "take these existing pieces of bitcoin, and create these new pieces, locked to these new owners".
- The pieces being spent are inputs.
- The new pieces being created are outputs.
- Whatever value goes in but doesn't come out is the fee, paid to the miner.
Like paying with notes
If you pay for a 6-euro coffee with a 10-euro note, you get 4 euros change. Bitcoin works the same way: you can't tear a coin in half. You spend whole coins and send the extra back to yourself as a change output.
What's inside
| Part | What it does |
|---|---|
| Inputs | Point to earlier outputs being spent, with proof (a signature) that you may spend them |
| Outputs | Amount in sats plus a lock (script) saying who can spend it next |
| Version and locktime | Rules about how and when it can be confirmed |
The pizza transaction
On 22 May 2010, the famous pizza transaction spent 131 inputs into one output of 10,000 BTC, paying a 0.99 BTC fee. Open it to see every input listed.
Reading a transaction on MyBitcoinExplorer
Open any transaction, for example from the latest blocks, and you'll see:
- Inputs on the left: the earlier outputs being spent, with their amounts.
- Outputs on the right: the new amounts and the addresses they're locked to.
- Fee: the difference between the two totals.
- Status: waiting in the mempool, or the block it confirmed in.
What a transaction can't do
- It can't spend part of an input: whole outputs are always consumed.
- It can't be edited after broadcast, only replaced. See Replace-by-fee (RBF).
- It can't say who the people are: only scripts and amounts are recorded.
Key takeaways
- A transaction spends existing outputs (inputs) and creates new outputs.
- Inputs minus outputs equals the fee.
- Change goes back to the sender as a new output.
Common questions
Does a transaction move coins from one address to another?
Not exactly. It destroys old outputs and creates new ones. Addresses are just a convenient way to describe who can spend the new outputs.
How big is a typical transaction?
A simple one-input, two-output payment is roughly 140 to 225 virtual bytes, depending on address type.
How long does a Bitcoin transaction take?
It reaches the network in seconds and usually confirms in the next few blocks, about 10 to 30 minutes, depending on the fee rate you pay.
Can I send bitcoin without a transaction fee?
Almost all nodes require a small minimum fee to relay a transaction, so in practice a fee is needed.