Bitcoin Change Outputs: Evidence and Heuristics
Understand Bitcoin change-output inference, avoid treating every output as an external payment, and preserve uncertainty in wallet transaction reports.

Overview
When translating these concepts into an integration, keep the scope described by the wallet history api with the result. The examples in wallet transaction history and smart contract event logs show how the same distinction affects neighbouring data questions.
A Bitcoin transaction spends outputs and creates new outputs. A wallet may receive change in the same transaction that pays another party. Identifying change can require wallet knowledge rather than a universal chain flag.
Separate outputs from recipients
Each output has value and a locking script. The blockchain does not generally label one output as customer payment and another as change. Wallet descriptors or verified ownership knowledge can establish which outputs belong to the wallet. Heuristics based on value or script type can be wrong and should remain labelled as inference.
Worked example: payment plus change
A wallet spends an input worth 1.0, creates an external output of 0.3 and a wallet-owned change output of 0.699, leaving a fee of 0.001. Calling all outputs external spending reports 0.999 instead of the intended 0.3 payment. Preserve both outputs and the ownership evidence used to classify them.
Test ambiguous cases
Include multiple payments, no change and collaborative transactions. Never assume the largest or final output is change. Keep script identity and outpoints so a later ownership update can revise the interpretation without altering the transaction evidence. If change cannot be established, report output-level data and uncertainty rather than a confident net-payment label.
A practical acceptance test
Spend one unit into a 0.3 external output and a 0.699 verified change output, leaving 0.001 fee. Assert the declared payment amount separately from gross outputs. Remove ownership evidence for change in another fixture: the application must retain ambiguity rather than assume the largest, smallest or final output is wallet-owned.
Questions about the topic
Frequently asked questions
Does Bitcoin mark the change output explicitly?
Not as a universal transaction field.
Is output position a reliable change rule?
No. Output ordering alone cannot establish wallet ownership.
Standards & technical documentation
