Chain analysis is mostly bookkeeping plus a handful of educated guesses, run at enormous scale. The guesses are called heuristics, and once you know the main ones you can look at a Bitcoin transaction and see roughly what a commercial analytics tool would infer from it.
The academic groundwork is older than most people expect. A 2013 paper by Sarah Meiklejohn and colleagues, "A Fistful of Bitcoins", bought goods from dozens of services, tagged the addresses they paid, and used simple clustering to map large chunks of the economy. The commercial firms (Chainalysis, Elliptic, TRM Labs and others) industrialised that approach. They sell to exchanges, which are often required to screen deposits, and to law enforcement.
Step one: clustering
The workhorse is the common input ownership heuristic. If a transaction spends three inputs, the assumption is that one entity controlled all three, because one entity had to sign for all of them. Merge those addresses into a cluster. Do that across every transaction in history and you end up with clusters that represent wallets, and sometimes whole businesses.
It's simple and it's mostly right, which is why it matters. A wallet that merges coins from your salary, an exchange withdrawal and a private sale has just told everyone those three came from the same person.
The heuristic breaks when several people sign one transaction together. That is the whole point of a CoinJoin, and it's also why analysts treat CoinJoin outputs as a category of their own rather than just failing to cluster them.
Step two: finding the change
Most transactions have two outputs: the payment and change going back to the sender. If you can tell which is which, you can follow the sender's money forward. Common tells:
| Heuristic | What it looks for |
|---|---|
| Round amount | A payment of 0.05000000 BTC alongside an output of 0.03184277 BTC. The odd number is probably change. |
| Script type | If the inputs are native SegWit (bc1q...) and one output matches that type while the other is a legacy address, the matching one is likely change. |
| Address reuse | If one output goes back to an input address, that's change, no guessing needed. |
| Unnecessary input | If the wallet used two inputs when one would have covered an output, that output probably isn't the payment. |
| Wallet fingerprint | Fee rates, input ordering, nLockTime and RBF signalling vary by wallet software. The change output tends to be spent later by the same software. |
None of these is decisive alone. Stacked together they often are.
Step three: attaching names
A cluster is just a blob of addresses until someone labels it. Labels come from a few places. Analysts deposit to and withdraw from services themselves to tag their addresses. Exchanges hold KYC data and respond to subpoenas. Public posts give away donation addresses. Leaked databases, seized servers and court filings add more. Once one label lands on a cluster, every address in that cluster inherits it.
Then the graph does the rest. Money leaving a labelled cluster can be followed hop by hop. A "peel chain", where a big balance is spent down in a long series of small payments each with a large change output, is easy to follow precisely because the change output is so obvious.
Beyond the chain
Commercial tools don't rely on on-chain data alone. Network-level observation matters too: whoever first relays a transaction is a good guess for who created it, and some firms have run listening nodes for that reason. This is the leak that broadcasting over Tor addresses. Wallets that query third-party servers with all their addresses hand over the cluster for free, which is why we recommend pointing Electrum at your own server through Tor.
Timing is another signal. A withdrawal from an exchange at 14:02 followed by a deposit elsewhere at 14:09 for nearly the same amount doesn't need clever maths.
Where it has worked, publicly
The US Department of Justice's 2019 takedown of the Welcome to Video site leaned heavily on tracing Bitcoin payments to identify users. The recovery of much of the 2016 Bitfinex hack proceeds, announced in 2022, came out of years of tracing. In both cases the court documents describe ordinary heuristics and exchange records, not secret magic. You can read some of these filings on justice.gov.
Where it falls down
Heuristics produce probabilities, and the tools present them with more confidence than the underlying method justifies. False positives happen: clusters get merged wrongly, CoinJoin participation is treated as suspicious by itself, and ordinary users find exchange accounts frozen because a deposit was a few hops away from something on a blocklist. In the Bitcoin Fog prosecution, the defence attacked the reliability of the Chainalysis Reactor software at length. The court still allowed it, but the argument is out there and it isn't going away.
Privacy coins are a different story. Monero hides senders with ring signatures, hides recipients with one-time addresses, and hides amounts. Analysis firms do claim some capabilities there, mostly built on metadata and user mistakes, but the basic clustering above doesn't apply. See Monero explained for the details and the caveats.
For a normal Bitcoin user the practical lesson is short. The heuristics feed on merged inputs, reused addresses, obvious change and leaky wallet software. Those are all things you control, and the article on UTXO hygiene goes through each one.