ChainUnfold
A VISUAL GUIDE3 min read

UTXOs and change: why one payment can create two outputs

Work through coin selection without imagining a single account balance being edited.

By chainunfold Reviewed 23 September 2026Revision 1

What you’ll be able to explain

  • Calculate change across one or several inputs and explain why outputs are consumed completely.

01 / Understand

You spend an output, not part of an output

A wallet shows 90,000 sats. Under the surface, imagine that value belongs to three unspent outputs: 40,000, 35,000 and 15,000 sats. The balance display adds them together, but they remain distinct records.

A new transaction selects previous outputs as inputs. Each selected output is consumed completely. To retain value after paying a recipient and a fee, the transaction creates a new output that the spender controls. That is change.

Suppose a fictional payment sends 50,000 sats with a 2,000 sat fee. The wallet might select the 40,000 and 15,000 outputs. Those inputs total 55,000, leaving 3,000 for change. The unused 35,000 output stays untouched.

Inputs:    40,000 + 15,000 = 55,000
Outputs:   50,000 recipient + 3,000 change = 53,000
Fee:       55,000 − 53,000 = 2,000

After the transaction, the wallet’s relevant unspent value in this simplified example is 35,000 untouched plus 3,000 change: 38,000 sats. That also equals the original 90,000 minus the 50,000 payment and 2,000 fee.

Change is new, not a remainder on the old record

The 40,000 sat output does not become a 3,000 sat output. It is spent. The change is a separate output created by the new transaction, with its own transaction identifier and output index.

An explorer usually cannot read a universal “this is change” flag because the transaction has no such ordinary field. Your wallet knows its own destinations; an outside observer may infer change, sometimes incorrectly.

The idea, at a glance

Select

40,000 + 15,000 → 55,000 sats.

Create

50,000 recipient + 3,000 change.

Reconcile

2,000 fee; 35,000 remains untouched.

One wallet balance can represent several outputs, and only selected outputs are consumed.

02 / Explore

More than one selection can balance

The wallet could instead select the 40,000 and 35,000 outputs. With our fixed teaching fee, that leaves 23,000 change and keeps the 15,000 output untouched. The post-payment total is still 38,000.

This does not make the two real transactions interchangeable. Input types and counts affect size; output choices affect future spending cost and privacy; network policy can affect whether small outputs are practical. Real coin selection balances multiple concerns, so “choose the smallest number of sats” is not a complete algorithm.

Selection Input total Recipient Example fee Change
40,000 + 15,000 55,000 50,000 2,000 3,000
40,000 + 35,000 75,000 50,000 2,000 23,000
35,000 + 15,000 50,000 50,000 2,000 Impossible

The last row can cover the recipient but not the fee. “My selected inputs equal the payment” is therefore insufficient. Conversely, failing to create intended change can allocate the difference to fees. Output review matters as much as the headline payment amount.

03 / Build

Reconcile both sides of the wallet

On paper, repeat the example with a 51,000 sat recipient amount and the same 2,000 fee. Using 40,000 + 15,000 as inputs, expected change is 2,000. The untouched 35,000 plus 2,000 change leaves 37,000.

Check two independent equations:

selected inputs = new outputs + fee
old wallet total = recipient + fee + remaining wallet total

Both should agree. Now attempt the 35,000 + 15,000 selection. Expected result: reject it, because the required 53,000 exceeds the selected 50,000.

This exercise tests accounting, not a production coin selector. Keep the fee fixed only to isolate the concept; adding inputs in a real transaction can change the fee needed for a given fee rate.

Pause & explain

Why can’t inputs totaling 50,000 sats fund a 50,000 sat payment with a 2,000 sat fee?

Try explaining it in your own words before opening the answer.

Compare your explanation

The required output plus fee totals 52,000. The transaction needs more input value, a smaller recipient amount, or a different fee; it cannot allocate the same sats twice.

Sources & scope

Primary references behind this explanation. Worked examples and diagrams are original teaching material.

  1. 01
    Bitcoin developer guide — Transactions ↗

    Input references, output conditions, and change. Historical examples use P2PKH; modern script types differ.

  2. 02
    BIP 141 — Segregated Witness ↗

    Transaction weight and virtual size definitions; no live fee recommendation.

Where this explanation stops

  • Amounts and fixed fees are fictional; dust policy and production coin selection are not implemented.

Keep unfolding

Bitcoin transaction fees and virtual size Read a Bitcoin transaction explorer without getting lost