How Bitcoin Transactions and UTXOs Work

Category: Start Here · Published 2026-07-01

Technically reviewed and sourced on 2026-07-03

What does this mean?Editorial review covers clarity and neutrality. Technical, security, and source reviews indicate whether an article's material claims were checked against relevant authoritative material. A source link being available does not by itself mean every claim has been verified. A reviewed status means the article's material claims were examined; it does not mean the article is exhaustive or that future protocol, market, or software changes cannot make it outdated.

There Are No Balances, Only Coins

When you look at a bank account, you see a single number: your balance. Bitcoin does not work this way. There is no ledger anywhere that stores a line saying this person owns 0.5 BTC. Instead, the network keeps track of individual chunks of bitcoin called unspent transaction outputs, or UTXOs.1

A useful way to picture it is a wallet full of physical cash. You do not carry a balance in your pocket, you carry specific pieces: a twenty, a five, three ones. Your total is just the sum of those pieces. A Bitcoin wallet works the same way. What software shows you as a balance is really the wallet quietly adding up every UTXO your keys are able to spend. Follow a single payment from start to finish and this becomes surprisingly intuitive.

Inputs, Outputs, and Change

Every payment reuses coins you already received. A transaction has two sides:

  • Inputs are the existing UTXOs you are spending. Each input points back to an earlier output and says, in effect, I want to use this one.
  • Outputs are the new UTXOs the transaction creates, each locked by a script that says who — or what conditions — can spend it.

Here is the part that surprises newcomers: a UTXO must be spent whole. Just as you cannot tear a twenty-dollar bill in half, you cannot spend only part of a UTXO. Say you hold a single 0.5 BTC output and want to send 0.2. Your wallet spends the entire 0.5, sends 0.2 to your friend, and sends the rest back to an address you control. That returned piece is called change, and it works exactly like the change a cashier hands back.

The gap between what goes in and what comes out is the transaction fee. It is not a separate charge you add on top; it is simply whatever is left over, total inputs minus total outputs. That leftover is claimed by the miner who eventually includes your transaction.1

The Signature That Authorises It

What stops you from spending someone else's coins? A digital signature. Each UTXO is locked by a script — most commonly one requiring a signature from the private key behind an address — and only whoever can satisfy that script's conditions can unlock it.

When you spend, your wallet uses that private key to sign the transaction. The signature proves two things at once: that you are authorised to spend those inputs, and — under the default signing mode wallets use — that the amounts and recipients have not been altered since you signed. Cleverly, it reveals your authority without revealing the key itself. Anyone can verify the signature; no one can work backwards from it to your private key.

This is why the phrase not your keys, not your coins matters. The private key is the ability to spend. Lose it and the coins are frozen forever; leak it and anyone can take them. Guarding that key is the whole game.

Broadcasting to the Network

A signed transaction is just a small bundle of data. To go anywhere, it has to reach the network, so your wallet broadcasts it to the Bitcoin nodes it is connected to.

Each node independently checks the transaction before passing it along. Are the signatures valid? Do the inputs actually exist and remain unspent? Do the numbers add up, with outputs never exceeding inputs? A transaction that fails any of these checks is quietly dropped and travels no further. One that passes is relayed to that node's peers, which relay it to theirs. Typically within a few seconds it has spread across much of the network of reachable nodes. No single company approves it; the shared rules do.

The Mempool: The Waiting Room

A valid transaction is still not confirmed. It waits in each node's mempool (short for memory pool), the holding area for transactions that have been broadcast but not yet written into a block.

Miners build the next block out of mempool transactions, and because space in a block is limited, they tend to favour those offering a higher fee relative to the space they occupy, a figure known as the fee rate.1 If a transaction is stuck, wallets that support opt-in replace-by-fee (RBF, BIP-125) can rebroadcast it at a higher fee rate.2 This creates a simple, open market:

  • Pay a competitive fee and your transaction is likely to be picked up quickly.
  • Pay a low fee when the network is busy and it may sit and wait, sometimes for hours.

Nothing is lost while it waits; it is simply pending. A new block is found roughly every ten minutes on average, so there is always another chance coming soon.

Confirmations: When Is a Payment Final?

The moment a miner includes your transaction in a valid block, it earns its first confirmation. Your inputs are now marked spent, and your outputs exist as fresh UTXOs the recipient can spend in turn.

Each additional block mined on top adds another confirmation, burying your transaction a little deeper in the chain. Undoing it would mean re-mining that block and every block after it, a task that grows exponentially harder with each new block added.3 This is why Bitcoin's finality is called probabilistic: never a hard stamp of done, but a certainty that climbs quickly toward practically absolute.

By common convention, six confirmations, very roughly an hour, is treated as thoroughly settled for large amounts. For small everyday sums, one confirmation is often plenty. There is no central cleared button; you simply choose how much certainty a given payment deserves.

FAQ

What exactly is a UTXO?

A UTXO, or unspent transaction output, is a discrete chunk of bitcoin locked to an address (more precisely, to a spending script), like a single bill in a wallet. Bitcoin has no account balances. What your wallet displays as a balance is just the sum of all the UTXOs your keys are able to spend.

Why did my wallet send bitcoin back to myself as change?

Because a UTXO must be spent whole. If you hold a 0.5 BTC output and want to send 0.2, the wallet spends the full 0.5, sends 0.2 to the recipient, and returns the rest to a change address you control, exactly like a cashier handing back change.

Why is my transaction stuck or unconfirmed?

An unconfirmed transaction is waiting in the mempool for a miner to include it in a block. Miners tend to favour higher fee rates, so a low fee during a busy period can leave it pending for a while. It is not lost; it is simply waiting its turn, and it can still be confirmed later.

How many confirmations does a Bitcoin transaction need?

There is no fixed rule. One confirmation means it is already in a block, and each later block makes reversal exponentially harder. Six confirmations, very roughly an hour, is a common convention for large amounts, while a single confirmation is often enough for small everyday payments.

Can a Bitcoin transaction be cancelled or reversed?

Once confirmed in a block, reversal quickly becomes impractical — each block added on top makes it exponentially less likely, though a very recent confirmation can still occasionally be undone by a short reorganization. While still unconfirmed in the mempool it has not truly settled, but you cannot simply cancel it. You can only wait, or in some cases replace it with a higher-fee version using opt-in replace-by-fee (RBF, BIP-125) if your wallet supports it; a related technique, child-pays-for-parent (CPFP), spends the pending output at a high fee to pull the parent in.

Key takeaways

  • Bitcoin has no account balances — a wallet balance is the sum of spendable UTXOs.
  • A UTXO is spent whole; the leftover returns to you as change, and the fee is inputs minus outputs.
  • Fees are priced by transaction size in virtual bytes (sat/vB), not by the amount sent.
  • The mempool is each node's own set of pending transactions, not one global database.
  • Finality is probabilistic: confirmations make reversal exponentially harder, never instantly absolute.