You open your Bitcoin wallet, enter an amount, and press Send.
Behind that simple button, your wallet has to make an important decision:
Which Bitcoin should it spend?
That might sound strange at first.
After all, if your wallet shows a balance of 0.05 BTC, why can’t it simply take 0.01 BTC from that balance and send it?
Bitcoin doesn’t work like a traditional bank account.
Your wallet’s balance is usually made up of multiple unspent transaction outputs, or UTXOs. Each UTXO represents a specific amount of Bitcoin that can be spent.
So when you send Bitcoin, the wallet has to select one or more of those UTXOs to use as transaction inputs.
That process is called coin selection.
And the decision matters more than most people realize.
The UTXOs a wallet chooses can affect:
- Transaction size
- Fees
- Change
- Privacy
- Future transaction costs
- UTXO management
- Consolidation opportunities
Modern Bitcoin Core includes dedicated wallet logic for coin selection, change handling, consolidation, and privacy-related selection behavior.
What Is Bitcoin Coin Selection?
Coin selection is the process of choosing which UTXOs a Bitcoin wallet will spend when creating a transaction.
Suppose your wallet contains:
UTXO A = 0.001 BTC
UTXO B = 0.003 BTC
UTXO C = 0.007 BTC
UTXO D = 0.015 BTC
Now you want to send:
0.004 BTC
plus a transaction fee.
Your wallet has several possibilities.
It could select:
0.007 BTC
and return the remainder as change.
Or it might select:
0.001 BTC + 0.003 BTC
if that combination can cover the payment and required fee.
The wallet therefore needs to solve a selection problem.
It isn’t simply asking:
“Do I have enough Bitcoin?”
It is asking:
“Which combination of my available UTXOs should I spend?”
Why Bitcoin Wallets Don’t Have a Single Balance to Spend
This is one of the most important concepts to understand.
Imagine you receive:
0.01 BTC
from one person.
Later, you receive:
0.02 BTC
from another.
Then someone sends you:
0.005 BTC
Your wallet might show:
0.035 BTC total
But underneath that balance could be three separate UTXOs:
0.010 BTC
0.020 BTC
0.005 BTC
There isn’t necessarily one 0.035 BTC object sitting inside your wallet.
The wallet controls several separate outputs.
When you make a payment, it chooses which outputs to spend.
That is why coin selection exists.
A Simple Coin Selection Example
Imagine your wallet contains:
UTXO 1 = 0.002 BTC
UTXO 2 = 0.004 BTC
UTXO 3 = 0.008 BTC
You want to send:
0.005 BTC
Your wallet could choose:
UTXO 3
and create something like:
0.008 BTC input
↓ Transaction ↓
0.005 BTC → Recipient
0.0028 BTC → Change
0.0002 BTC → Fee
But it could also combine:
UTXO 1 + UTXO 2
to get:
0.006 BTC
Then the transaction might contain:
0.002 BTC input
0.004 BTC input
↓ Transaction ↓
0.005 BTC → Recipient
0.0008 BTC → Change
0.0002 BTC → Fee
Both transactions could accomplish the same payment.
But they are not equally attractive.
The first uses one input.
The second uses two.
That difference affects transaction size and therefore potentially the fee.
This is where coin selection becomes important.
Why Fewer Inputs Often Matter
Each transaction input carries data.
More inputs generally mean a larger transaction.
A larger transaction generally requires more block space.
And more block space can mean a higher fee at the same fee rate.
Suppose two transactions send the same amount:
Transaction A
1 input
2 outputs
Transaction B
3 inputs
2 outputs
Transaction B generally contains more input data.
Therefore, if both use the same fee rate, Transaction B will generally cost more in absolute fees.
A wallet may therefore prefer a smaller number of inputs.
But that’s not always the correct choice.
Sometimes spending additional UTXOs now can make future transactions cheaper or improve privacy.
So coin selection is an optimization problem rather than a simple “use the fewest coins possible” rule.
Coin Selection Is About More Than Fees
A wallet might consider several competing goals.
For example:
Minimize transaction size
Avoid unnecessary change
Preserve privacy
Avoid creating tiny UTXOs
Consolidate UTXOs when fees are favorable
Avoid linking certain coins
Those goals can conflict.
A selection that produces the smallest transaction today might create an inconvenient UTXO for tomorrow.
A privacy-friendly selection might require more inputs and therefore cost more.
A consolidation-focused selection may intentionally spend more UTXOs than strictly necessary.
Bitcoin Core’s current wallet options explicitly account for issues such as partial-spend avoidance, consolidation, discardable change, and fee trade-offs.
What Is the Wallet Actually Selecting?
The wallet isn’t selecting “coins” in the physical sense.
The word coin is convenient shorthand.
Technically, the wallet is selecting UTXOs.
A UTXO has:
- A transaction ID
- An output index
- A value
- A locking script
For example:
Transaction:
abc123...
Output:
#1
Value:
0.007 BTC
Locking condition:
Spendable by the required key/script
When your wallet selects that UTXO, it becomes an input in the new transaction.
The original UTXO is then consumed when the transaction confirms.
The new transaction creates new outputs.
What Happens to the UTXO You Spend?
Suppose you have:
0.007 BTC UTXO
and use it to send:
0.005 BTC
The original UTXO doesn’t remain partially available.
It is spent completely.
The new transaction might create:
0.005 BTC → Recipient
0.0018 BTC → Change
0.0002 BTC → Fee
Once confirmed, the 0.0018 BTC change becomes a new UTXO.
So the process is:
Old UTXO
↓
Spent as input
↓
New transaction
↓
New recipient UTXO
+
New change UTXO
This is the fundamental reason coin selection and change are connected.
Why Your Wallet May Choose a “Weird” UTXO
Imagine your wallet contains:
0.001 BTC
0.002 BTC
0.010 BTC
0.020 BTC
You want to send:
0.009 BTC
You might expect the wallet to spend the 0.010 BTC UTXO because it’s the obvious choice.
But the wallet might choose a different combination depending on its selection strategy, fee estimates, privacy goals, or consolidation logic.
For example, it may decide that spending the 0.002 BTC and 0.010 BTC UTXOs produces a better overall result under its current objectives.
The wallet isn’t necessarily making a mistake.
It is optimizing against several variables.
Why Exact Matches Can Be Valuable
One attractive situation is when the wallet can fund the payment and fee without creating change.
Suppose:
UTXO = 0.0052 BTC
You want to send:
0.005 BTC
and the required fee is:
0.0002 BTC
The entire UTXO can be consumed.
There is no change output.
That can be useful because the transaction avoids creating another output that you’ll have to manage later.
In other words:
0.0052 BTC UTXO
↓
0.005 BTC payment
+
0.0002 BTC fee
No change is created.
This can reduce transaction output data and prevent the creation of a small leftover UTXO.
Why the “Smallest UTXO Possible” Isn’t Always Best
You might think:
“Always use the smallest UTXO that covers the payment.”
That can sometimes make sense.
But consider a wallet with:
0.002 BTC
0.002 BTC
0.002 BTC
0.002 BTC
0.20 BTC
Suppose you’re sending:
0.0015 BTC
Using one 0.002 BTC UTXO is efficient.
But imagine the wallet has many tiny UTXOs that are expensive to spend later.
A wallet may sometimes intentionally consolidate them when the fee environment makes doing so economical.
Bitcoin Core has a current consolidatefeerate setting that allows transaction construction to use more inputs than strictly necessary when the fee rate is low enough to make reducing the wallet’s UTXO pool worthwhile.
So the best selection isn’t always the one that minimizes today’s inputs.
Sometimes a wallet is also thinking about tomorrow.
What Is UTXO Consolidation?
UTXO consolidation means combining multiple UTXOs into fewer larger UTXOs.
Imagine you have:
0.0005 BTC
0.0007 BTC
0.0009 BTC
0.0011 BTC
A consolidation transaction could spend all of them and create one larger output.
Conceptually:
4 small UTXOs
↓
One transaction
↓
1 larger UTXO
Why do this?
Because spending four separate inputs later can require considerably more transaction data than spending one larger UTXO.
Consolidation can therefore reduce future input overhead.
But it has a cost.
The consolidation transaction itself requires fees.
That’s why wallets may only favor consolidation when fee conditions make it economical. Bitcoin Core’s current wallet exposes a consolidation-fee threshold specifically for this purpose.
Coin Selection Can Affect Privacy
Coin selection isn’t only about money.
It can also reveal relationships between your UTXOs.
Suppose your wallet received:
0.01 BTC
from one source.
And:
0.02 BTC
from another source.
If you combine both UTXOs into one transaction, blockchain observers can potentially infer that those coins are controlled by the same entity.
That doesn’t always prove ownership with certainty, but it can create a useful clustering clue.
This is one reason wallets can consider privacy when choosing UTXOs.
What Is Partial-Spend Avoidance?
Imagine an address received several separate payments.
For example:
Address A
├── 0.01 BTC
├── 0.02 BTC
└── 0.03 BTC
A wallet could spend only one of those outputs.
Bitcoin Core has a partial-spend avoidance feature that can instead group outputs associated with the same address and select many—or all—of them rather than selecting only some. The feature is explicitly documented as a privacy-related option, although it can sometimes increase fees because it may require more inputs.
The basic idea is:
Don’t unnecessarily expose a partial relationship if grouping the outputs produces a better privacy outcome.
But again, privacy can come with a fee cost.
Privacy vs Fee Efficiency
This is one of the most important trade-offs in coin selection.
Imagine two possible choices.
Option A
2 inputs
Lower fee
But the inputs have unrelated histories that you may prefer not to combine.
Option B
4 inputs
Higher fee
But the wallet’s selection policy may consider the grouping preferable from a privacy or UTXO-management perspective.
There isn’t always one universally “correct” answer.
A wallet is balancing competing goals.
That’s why different wallet software can choose different inputs for the same payment.
Why Two Wallets Can Choose Different Coins
Suppose two wallets control exactly the same UTXOs.
You ask both wallets to send:
0.005 BTC
They might produce different transactions.
Wallet A may prefer:
One large UTXO
Wallet B may prefer:
Several smaller UTXOs
Both can be valid.
Why?
Because their algorithms and policies can differ.
One may prioritize:
Lowest immediate fee
while another may emphasize:
Privacy
UTXO consolidation
or:
Address reuse avoidance
This means coin selection is part of a wallet’s overall design philosophy.
Does Bitcoin Decide Which UTXO You Spend?
No.
This is another key distinction.
Bitcoin consensus rules determine whether the transaction is valid.
But your wallet chooses which UTXOs to put into the transaction.
The wallet constructs the transaction.
You sign it.
Nodes then validate it.
The broad workflow is:
Wallet selects UTXOs
↓
Wallet creates transaction
↓
Wallet calculates/sets fee
↓
Wallet signs
↓
Network validates
↓
Transaction enters a mempool
↓
Miner includes it in a block
Coin selection happens before the transaction reaches the blockchain.
Can You Choose the UTXOs Yourself?
Yes, depending on the wallet.
This is generally called coin control or manual coin selection.
Instead of allowing the wallet to automatically choose inputs, the user can choose specific UTXOs.
This can be useful for advanced users who want to control:
- Privacy
- Which funds are spent
- UTXO consolidation
- Separate funds
- Avoiding unwanted address combinations
Bitcoin Core provides wallet functionality for manual input selection, while broader Bitcoin wallet tooling also distinguishes automatic coin selection from user-controlled coin management.
For beginners, automatic selection is usually easier.
For advanced users, coin control provides more visibility and control.
Why Manual Coin Control Can Matter
Imagine you have one UTXO associated with a publicly known payment.
You also have private savings that you don’t want to connect to that payment.
If your wallet automatically combines both UTXOs into one transaction, the blockchain may reveal a relationship between them.
Manual coin control can allow you to avoid that combination.
This doesn’t guarantee privacy.
But it gives you more control over the transaction’s input set.
Coin Selection and Bitcoin Fees
Fees are usually based on transaction size and the fee rate you pay.
Since inputs contribute significantly to transaction size, choosing different UTXOs can change the eventual fee.
For example:
Selection A
1 input + 2 outputs
↓
Smaller transaction
Selection B
4 inputs + 2 outputs
↓
Larger transaction
At the same fee rate, Selection B generally costs more.
This is why coin selection and fee estimation cannot really be separated.
The wallet has to estimate the transaction size while it is deciding which UTXOs to spend.
Coin Selection Is an Optimization Problem
At this point, the main idea should be clear.
A Bitcoin wallet isn’t simply searching for:
“Enough Bitcoin.”
It is trying to find a useful combination of UTXOs while considering several competing goals.
A simplified version looks like:
Available UTXOs
↓
Possible combinations
↓
Fee impact
↓
Change impact
↓
Privacy impact
↓
Future UTXO impact
↓
Wallet selection
↓
Transaction inputs
The exact algorithm varies between wallets.
Bitcoin Core’s wallet has dedicated coin-selection code, and modern wallet software can use different strategies or optimization criteria.
What Is Branch and Bound?
One of the better-known coin-selection techniques is called:
Branch and Bound
or:
BnB
The basic goal is to search for an input combination that funds the transaction without creating unnecessary change, when that type of selection makes sense.
Bitcoin Core’s implementation describes BnB as a depth-first search through possible combinations of UTXOs. It looks for a selection that reaches the target while staying within a range that accounts for the cost of creating and later spending a change output.
Imagine you have:
UTXO A = 0.006 BTC
UTXO B = 0.004 BTC
UTXO C = 0.003 BTC
UTXO D = 0.002 BTC
Your target is:
0.010 BTC
The wallet could find:
A + B = 0.010 BTC
That may be attractive because it reaches the target without requiring a change output.
But the wallet doesn’t blindly stop at the first combination it finds.
It evaluates possible candidates according to its selection criteria.
Why Is It Called Branch and Bound?
Imagine every UTXO creates a yes-or-no decision:
Include it?
or:
Skip it?
That produces a branching tree.
For example:
Start
/ \
Include Skip
A A
/ \ / \
B Skip B Skip
With more UTXOs, the number of possible combinations grows rapidly.
If you have:
10 UTXOs
there are many possible subsets.
With:
50 UTXOs
the theoretical number of combinations becomes enormous.
A wallet can’t waste unlimited computing power checking every possible combination.
So branch-and-bound algorithms use rules to eliminate groups of combinations that cannot produce a better result.
Bitcoin Core’s implementation uses techniques such as lookahead and skipping equivalent or clearly inferior UTXOs to reduce the amount of searching required.
What Is the Cost of Change?
This is one of the most important ideas in modern coin selection.
Suppose your wallet selects:
0.012 BTC
to pay:
0.010 BTC
You have:
0.002 BTC
left.
That remainder could become a change output.
But creating a change output has a cost.
The transaction needs additional data for that output.
And later, when you spend the change UTXO, that input also consumes block space.
So the wallet can think of change as having both:
an immediate cost
and:
a future spending cost
Bitcoin Core’s BnB implementation explicitly uses the estimated cost of creating and spending change when defining its acceptable target range.
Why an Exact Match Isn’t Always Required
Suppose you’re sending:
0.010 BTC
You have:
0.010 BTC
0.012 BTC
0.020 BTC
The first UTXO appears perfect.
But remember the transaction fee.
If you spend exactly 0.010 BTC, you still need room for the fee.
So the target isn’t simply:
0.010 BTC
It is more like:
Payment + required fee
The wallet also has to account for input and output sizes.
Therefore, a UTXO that appears to match the payment exactly may not actually be sufficient.
Why the Wallet May Prefer a Slightly Larger Selection
Imagine:
Payment = 0.010 BTC
and the wallet needs a total input amount of approximately:
0.0102 BTC
for the fee.
Suppose it has:
0.0101 BTC
and:
0.011 BTC
The first is too small.
The wallet must choose another option.
If it uses 0.011 BTC, it creates a small remainder after paying the transaction fee.
That remainder might become change.
The wallet then compares the cost of creating that change against other possible UTXO combinations.
What Is Waste?
Modern coin selection doesn’t simply compare selected amounts.
Bitcoin Core’s BnB implementation also uses a concept called waste.
Its documented waste formula includes:
Input cost at the current fee rate
minus:
Long-term expected cost
plus:
The excess amount selected above the target.
In simplified form:
waste =
input cost difference
+
excess
The exact implementation also accounts for whether the current fee rate is above or below the long-term fee rate.
Why does this matter?
Because the wallet wants to balance:
What does spending these UTXOs cost now?
against:
What might it cost to spend them later?
Current Fees vs Future Fees
Imagine you have two possible selections.
Selection A
Spend one large UTXO.
It requires more value now but uses relatively few inputs.
Selection B
Spend four smaller UTXOs.
The transaction uses more inputs today.
But afterwards, your wallet has fewer small UTXOs to deal with.
If current fees are high, spending four inputs may be expensive.
If current fees are low, consolidating those smaller UTXOs may be more attractive.
Bitcoin Core’s coin-selection model includes a long-term fee concept for evaluating this trade-off.
This is why the cheapest selection today isn’t necessarily the selection that minimizes your total future costs.
CoinGrinder: Choosing the Lightest Useful Selection
Modern Bitcoin Core also includes an algorithm called:
CoinGrinder
Its purpose differs from BnB.
Bitcoin Core describes CoinGrinder as a depth-first search that aims to find the minimum-weight input set that can fund the transaction, while producing a transaction with a change output rather than specifically seeking a changeless transaction.
In simple terms:
BnB can look for a good changeless solution.
CoinGrinder focuses on finding an efficient input set when change is part of the result.
This illustrates an important point:
There isn’t one universal coin-selection strategy that is ideal for every transaction.
Different algorithms can solve different selection goals.
Single Random Draw
Bitcoin Core also has:
Single Random Draw
or:
SRD
As the name suggests, it introduces randomness into the selection process.
The current implementation shuffles the available output groups and selects them while accounting for a change target. It also deliberately considers a lower-bound change amount to avoid producing extremely small change.
Why would a wallet use randomness?
Because deterministic selection can sometimes produce recognizable patterns.
Varying selections can make wallet behavior less predictable.
However, randomness isn’t the same thing as privacy by itself.
A wallet still needs sensible overall selection policies.
Why Randomness Can Help Privacy
Imagine a wallet always spends its largest UTXO first.
Over time, an observer might notice that pattern.
Now imagine another wallet uses a selection strategy that sometimes chooses different combinations.
The resulting transactions may be less predictable.
Again, that doesn’t make the wallet anonymous.
It simply avoids unnecessarily rigid behavior.
Bitcoin Core also has privacy-oriented grouping and output-selection logic beyond simple random choice.
What Happens During High-Fee Periods?
Fee conditions can strongly influence coin selection.
Suppose network fees are extremely high.
Your wallet has:
0.002 BTC
0.004 BTC
0.007 BTC
0.020 BTC
You want to send:
0.005 BTC
A selection using:
0.002 + 0.004
requires two inputs.
Using:
0.007
requires only one.
At a high fee rate, the one-input transaction may be significantly cheaper.
The wallet can therefore favor selections that avoid unnecessary input overhead.
What Happens When Fees Are Low?
The trade-off can reverse.
Suppose fees are unusually low.
You have:
0.0008 BTC
0.001 BTC
0.0012 BTC
0.002 BTC
0.010 BTC
You want to send:
0.005 BTC
The wallet could use the 0.010 BTC UTXO.
But during a low-fee period, it may make sense in some circumstances to spend several smaller UTXOs together and reduce the future UTXO pool.
Bitcoin Core exposes a consolidation fee-rate threshold that can allow transaction construction to use more inputs than strictly necessary when fees are low enough for consolidation to be worthwhile.
Why Consolidation Can Save Money Later
Suppose you have ten tiny UTXOs.
When fees are cheap, combining them can make sense.
Later, if fees become expensive, spending all ten as inputs could be costly.
So a wallet can think ahead:
Spend more inputs now while they’re cheap
instead of:
Wait and pay much more later
That’s the strategic side of coin selection.
The wallet isn’t only solving today’s transaction.
It can also manage the wallet’s future UTXO composition.
What Is Coin Control?
Automatic coin selection isn’t the only option.
Advanced Bitcoin wallets can give the user manual control over which UTXOs are spent.
This is generally called:
Coin control
Instead of saying:
“Wallet, choose whatever you think is best,”
you can say:
“Use this UTXO and not that one.”
Bitcoin Core’s CCoinControl functionality allows inputs to be pre-selected for spending. Its documentation describes this as locking specific outputs into the transaction even if they would not otherwise be considered the most optimal automatic selection.
Why Would Anyone Want Coin Control?
Privacy is one major reason.
Imagine:
UTXO A
Known publicly
UTXO B
Private savings
You don’t want a transaction that links them together.
Automatic selection might choose both.
Manual coin control lets an advanced user select only UTXO A, assuming it provides enough value.
This gives the user more control over the transaction’s input set.
Coin Control Can Also Help With UTXO Management
Suppose you deliberately created a group of small UTXOs during low-fee periods.
Later, you may want to consolidate them.
Coin control lets you choose those specific UTXOs.
It can also help users:
- Spend older UTXOs first.
- Keep certain funds separate.
- Avoid mixing known sources.
- Consolidate selected outputs.
- Inspect which UTXOs are being spent.
The downside is that manual control adds complexity.
A user who selects inputs without understanding the consequences can accidentally create a more expensive or less private transaction.
Why Wallet Software Filters UTXOs Before Selecting Them
Not every UTXO is automatically eligible.
Wallet software can filter UTXOs based on factors such as:
- Confirmation status.
- Whether the wallet controls them.
- Ancestor relationships.
- Cluster-related restrictions.
- Other eligibility conditions.
Bitcoin Core’s current coin-selection interfaces include eligibility filters for things such as minimum confirmations, maximum ancestor counts, and cluster counts.
So coin selection is not simply:
Look at every UTXO → choose the best combination.
It is more like:
Filter usable UTXOs → group candidates → evaluate selections → choose the best valid result.
Why the Wallet May Group UTXOs
The wallet can sometimes treat related outputs as a group.
For example, outputs from the same address may be handled together when privacy-related settings call for it.
Bitcoin Core’s -avoidpartialspends option groups outputs by address, selecting many—or all—or none rather than choosing on a strictly per-output basis. The documentation notes that this can improve privacy but can also increase fees.
This creates another trade-off:
More grouping
can mean:
better privacy
but potentially:
larger transactions
Why More Inputs Can Sometimes Be Better
At first, this sounds contradictory.
Earlier we said fewer inputs often reduce fees.
That’s true.
But more inputs can still be beneficial when:
- Fees are currently low.
- You’re consolidating small UTXOs.
- Avoiding partial spending improves privacy.
- A particular selection avoids an undesirable change output.
- The additional inputs produce a better long-term result.
Coin selection therefore isn’t about minimizing one number.
It is about balancing several costs.
A Realistic Example
Imagine your wallet contains:
A = 0.003 BTC
B = 0.004 BTC
C = 0.007 BTC
D = 0.012 BTC
You want:
0.006 BTC
plus fees.
Possible selections include:
A + B
0.007 BTC
Two inputs.
Some change.
C
0.007 BTC
One input.
Small change.
A + C
0.010 BTC
Two inputs.
More change.
B + C
0.011 BTC
Two inputs.
More change.
A wallet doesn’t just look at the numbers.
It can also consider:
- Input weight.
- Current fee rate.
- Long-term fee assumptions.
- Change cost.
- Waste.
- Privacy-related grouping.
- UTXO eligibility.
That is what makes coin selection a real optimization problem.
Why Your Wallet Doesn’t Explain Every Selection
Most users only see:
Send 0.006 BTC
The wallet chooses the inputs automatically.
It usually doesn’t show:
“I selected UTXO C because it minimized estimated waste while avoiding a change output.”
That level of detail is hidden because it would overwhelm ordinary users.
But underneath the interface, the wallet is performing exactly this kind of analysis.
Coin Selection and Bitcoin Privacy
One of the biggest reasons coin selection matters is privacy.
Suppose your wallet contains two UTXOs:
UTXO A: received from a personal wallet
UTXO B: received from a business
If your wallet spends both in the same transaction, an outside observer may infer that the two UTXOs are controlled by the same entity.
This is commonly called common-input ownership analysis.
It doesn’t prove ownership with absolute certainty.
But combining inputs creates a useful blockchain-analysis clue.
That’s why privacy-conscious wallets can avoid unnecessary combinations of UTXOs.
Why Mixing UTXOs Can Reveal Information
Imagine you receive Bitcoin from two completely unrelated sources:
UTXO A → Source 1
UTXO B → Source 2
Later, your wallet creates:
UTXO A + UTXO B
↓
New transaction
An observer can now see that both inputs were spent together.
They may infer that the same entity controlled both.
This is one reason automatic coin selection isn’t purely a fee-minimization problem.
A wallet may need to consider whether combining particular UTXOs creates an unnecessary privacy relationship.
Address Reuse and Coin Selection
Coin selection also interacts with the way wallets manage addresses.
Bitcoin wallets may use fresh change addresses and separate receiving and change pools.
Bitcoin Core currently has an avoidpartialspends option that groups outputs by address instead of selecting them independently. The documentation notes that this can improve privacy, although it can also increase fees because more inputs may be required.
This shows the larger trade-off:
Better privacy can cost more block space.
There isn’t always a free privacy improvement.
What Is Coin Control?
For advanced users, automatic selection isn’t the only option.
Many wallets provide some form of coin control.
Coin control lets you manually choose which UTXOs a transaction will spend.
Instead of:
“Wallet, choose the inputs for me.”
you can effectively choose:
“Spend these specific UTXOs.”
Bitcoin Core’s CCoinControl system allows outputs to be preselected for spending, meaning the selected output can be included even when it isn’t considered the wallet’s automatic optimal choice.
Why Would You Use Coin Control?
There are several reasons.
Privacy
You may want to avoid combining funds from different sources.
UTXO Management
You may want to consolidate several small UTXOs.
Spending Specific Funds
You may want to use a particular UTXO rather than your wallet choosing another.
Avoiding Unwanted Change
You may prefer a specific input set that creates less change.
Managing Known Funds
You may want to keep certain coins separate from others for accounting or privacy reasons.
Coin control gives you visibility into the UTXOs that automatic coin selection normally hides.
Coin Control Can Also Go Wrong
Manual control gives you more power, but it also creates more responsibility.
Suppose you intentionally select three tiny UTXOs during a period of high fees.
The transaction could become much more expensive than necessary.
Or you may accidentally combine UTXOs that you wanted to keep separate for privacy reasons.
So coin control isn’t automatically better than automatic selection.
It is better described as:
more control
rather than:
better results
What Is a Dust UTXO?
Another important part of coin selection is dust.
A tiny Bitcoin output may be technically valid but economically impractical to spend.
Bitcoin Core defines dust according to a configurable dust relay fee and the cost of spending the output. The current default dust relay fee is 3,000 sat/kvB, and the exact dust threshold depends on the output type. For example, Bitcoin Core’s policy code gives typical thresholds of 546 satoshis for a legacy-style spendable output and 294 satoshis for a typical P2WPKH output under that default dust relay fee.
The important point is:
Dust isn’t simply “Bitcoin below one fixed amount.”
The policy depends on how costly the output is to spend and the node’s configured dust relay fee.
Why Dust Matters for Coin Selection
Imagine your wallet receives:
0.000001 BTC
That’s a very small output.
If spending the output later requires more fees than the value it contains, keeping it may not be economically useful.
Now imagine your wallet has hundreds of tiny outputs.
Your total balance might look healthy.
But your wallet could still face expensive future transactions because spending those UTXOs requires many inputs.
This is sometimes called UTXO bloat or a fragmented UTXO set.
UTXO Consolidation Can Help
Coin selection can deliberately reduce this fragmentation.
Suppose you have:
0.0005 BTC
0.0006 BTC
0.0007 BTC
0.0008 BTC
0.0010 BTC
You might consolidate them into a smaller number of outputs during a period of relatively low fees.
Bitcoin Core’s consolidatefeerate setting allows transaction construction to use more inputs than strictly necessary when the fee rate is low enough that reducing the wallet’s UTXO pool is considered worthwhile.
The basic strategy is:
Pay a manageable cost now
instead of:
Pay a much larger input cost later.
Why Consolidation Timing Matters
Imagine transaction fees are:
5 sat/vB today
and later rise to:
100 sat/vB
Spending ten small UTXOs at 5 sat/vB may be relatively inexpensive.
Spending those same ten UTXOs at 100 sat/vB could be dramatically more expensive.
So if your wallet has many small UTXOs, a low-fee environment can provide an opportunity to consolidate them.
Of course, fee conditions are unpredictable.
You should not assume that a future high-fee period will definitely occur.
The point is simply that UTXO management can be cheaper when input costs are lower.
Why a Large UTXO Isn’t Always Better
You might conclude:
“Then I should consolidate everything into one giant UTXO.”
Not necessarily.
Large UTXOs also have trade-offs.
For example, spending one huge UTXO can create a much larger visible payment history around that coin.
It can also link funds that you may prefer to keep separate.
Privacy and cost therefore pull in different directions.
A wallet may deliberately maintain several UTXOs rather than one giant balance.
Coin Selection and Future Transaction Fees
This is perhaps the most important long-term lesson.
The UTXOs you have today influence the cost of your transactions tomorrow.
Suppose Wallet A has:
5 large UTXOs
while Wallet B has:
50 tiny UTXOs
Both wallets contain:
1 BTC total
But Wallet B may require more inputs for a typical payment.
That can result in larger transactions and therefore higher fees at the same fee rate.
This is why UTXO management matters even when your total Bitcoin balance is identical.
A Practical Example
Imagine two wallets each hold:
0.10 BTC
Wallet A
0.10 BTC
One UTXO.
Wallet B
0.001 BTC × 100
One hundred small UTXOs.
Both wallets have exactly:
0.10 BTC
But if both need to send:
0.05 BTC
Wallet A may only need one input.
Wallet B may need many inputs.
The transaction from Wallet B could therefore require significantly more block space.
The difference isn’t the amount being sent.
It’s the structure of the funds being spent.
Why Wallets Don’t Always Consolidate Automatically
Automatic consolidation isn’t always desirable.
It can:
- Increase current fees.
- Link UTXOs together.
- Reduce privacy.
- Create a large transaction unnecessarily.
- Produce a new change structure.
Bitcoin Core therefore exposes a configurable consolidation fee threshold rather than blindly consolidating whenever possible.
A wallet has to decide when consolidation is worth the cost.
Coin Selection During High Fees vs Low Fees
The strategy can look very different depending on the fee environment.
During high fees
A wallet may prefer:
Fewer inputs
Smaller transaction size
Less unnecessary change
During low fees
A wallet may have more room to consider:
UTXO consolidation
Cleaning up fragmented funds
Using additional inputs
The exact behavior depends on the wallet’s implementation and configuration.
How Change Fits Into Coin Selection
Change is the bridge between coin selection and wallet management.
Suppose your wallet selects:
0.015 BTC
to send:
0.010 BTC
After the fee, the remainder becomes change.
That change creates another UTXO.
So every time you spend Bitcoin, your transaction can affect the shape of your wallet’s future UTXO pool.
You might start with:
5 UTXOs
After a transaction, you could end up with:
3 old UTXOs
+
1 new change UTXO
Later, that change becomes an input.
Then another change output can appear.
Coin selection is therefore part of a continuous cycle.
A Wallet Is Managing a UTXO Portfolio
This is a useful way to think about it.
Your wallet isn’t only managing:
“How much Bitcoin do I own?”
It is also managing:
“What individual UTXOs do I control?”
Some may be:
- Large.
- Small.
- Old.
- New.
- Publicly associated with you.
- Less connected to your identity.
- Expensive to spend.
- Convenient to spend.
A smart wallet has to make decisions about this collection.
That’s what makes coin selection much more important than it initially appears.
Common Coin-Selection Mistakes
Spending Every Available UTXO
You usually don’t need to combine your entire wallet into one transaction.
That can create a large and expensive transaction while unnecessarily linking your funds.
Ignoring Small UTXOs
Small UTXOs aren’t automatically bad, but a large collection of tiny outputs can become expensive to spend.
Consolidating During High Fees
Consolidation is generally more attractive when input costs are lower.
Assuming the Largest UTXO Is Always Best
The wallet may have better reasons to select another combination.
Using Coin Control Without Understanding It
Manual selection gives more control but can also create larger fees or privacy problems.
Assuming Coin Selection Is Universal
Different wallets can choose different UTXOs because they use different policies and algorithms.
Ignoring Privacy
Combining unrelated UTXOs can create stronger blockchain-analysis clues.
Frequently Asked Questions
What is Bitcoin coin selection?
Bitcoin coin selection is the process of choosing which UTXOs a wallet will use as inputs when constructing a transaction.
Why doesn’t Bitcoin just spend my wallet balance?
Because a Bitcoin wallet balance is generally made up of multiple separate UTXOs rather than one account-style balance.
Does Bitcoin Core choose the cheapest UTXOs first?
Not necessarily.
Its coin-selection system evaluates multiple factors, including input cost, change, long-term costs, and other selection criteria.
What is Branch and Bound?
It is a coin-selection search method that attempts to find useful combinations of UTXOs without unnecessary change when the conditions make such a selection possible.
What is CoinGrinder?
It is a Bitcoin Core coin-selection algorithm designed to search for a low-weight input set while producing change.
What is Single Random Draw?
It is a coin-selection method that uses randomized ordering when choosing candidate UTXOs.
What is coin control?
Coin control lets users manually select which UTXOs a wallet should spend. Bitcoin Core’s coin-control interface can lock selected outputs into the transaction even when they aren’t the automatic optimal selection.
Does coin selection affect Bitcoin fees?
Yes.
Different UTXO selections can create different numbers and sizes of inputs, which can change transaction size and therefore the required fee at a given fee rate.
Does coin selection affect privacy?
It can.
Combining UTXOs can create blockchain-analysis clues connecting their histories.
What is UTXO consolidation?
It is the process of combining multiple UTXOs into fewer outputs so future transactions may require fewer inputs.
What is Bitcoin dust?
Dust is an output that is considered too small to be economical to spend under a node’s dust policy. The threshold depends on the output type and dust relay fee.
Should I consolidate all my Bitcoin?
Not necessarily.
Consolidation can reduce future input overhead, but it can also cost fees and may link UTXOs that you would prefer to keep separate.
Can I choose my own Bitcoin inputs?
Some wallets support manual coin control, allowing you to select specific UTXOs yourself.
The Complete Coin-Selection Process
When you click Send, your wallet is doing much more than subtracting a number from your balance.
A simplified workflow is:
1. Identify available UTXOs
↓
2. Filter UTXOs that can be used
↓
3. Calculate the target amount
↓
4. Estimate transaction size and fee
↓
5. Evaluate possible UTXO combinations
↓
6. Consider change
↓
7. Consider privacy and UTXO management
↓
8. Choose the input set
↓
9. Create outputs
↓
10. Sign the transaction
↓
11. Broadcast it
Bitcoin Core’s wallet architecture explicitly separates automatic coin selection, preselected coin control, and transaction creation/change handling.
Final Thoughts
Your Bitcoin wallet doesn’t simply ask:
“How much Bitcoin do I have?”
It also has to answer:
“Which Bitcoin should I spend?”
That question is the heart of coin selection.
The wallet has to choose from potentially dozens, hundreds, or even thousands of UTXOs.
It may consider:
Transaction fees
Change
Future spending costs
Privacy
Consolidation
Dust
UTXO relationships
and:
Wallet policy
That’s why two wallets holding the same amount of Bitcoin can produce different transactions when asked to make the same payment.
Coin selection is happening quietly behind the Send button.
And although most users never see the algorithms involved, those decisions can affect how much a transaction costs, what information it reveals, and how manageable the wallet remains over time.
The most useful lesson is this:
Your Bitcoin balance is only one number. Your UTXOs are the actual pieces your wallet has to manage.
Good coin selection tries to spend those pieces efficiently without creating unnecessary costs or privacy problems.
Once you understand that, Bitcoin transactions stop looking like simple transfers between account balances.
You can start seeing what they really are:
A carefully constructed transaction that consumes specific UTXOs and creates new outputs.



