How the Calculator Matches Buys to Sells
Accurate capital gains calculation depends entirely on correctly pairing each sell with the right prior buy transactions. This calculator uses strict First-In-First-Out (FIFO) logic to ensure consistent, transparent, and tax-compliant matching every time.
When you sell cryptocurrency, the tool automatically looks at all your previous unmatched buy lots and consumes them in chronological order — starting with the oldest purchase first.
The Step-by-Step Matching Process
For every sell, the calculator begins with the earliest remaining buy lot. It uses as much of that lot as needed to cover the sell quantity. If the oldest lot is fully consumed, it moves to the next oldest, continuing until the entire sell amount is matched.
Partial Matches Are Fully Supported
A single sell can draw from multiple older buys, and a single buy lot can be split across multiple future sells. Remaining quantities stay in the queue with their original date and cost basis intact.
Why This Matters for Holding Periods
Each matched portion inherits the exact acquisition date of its buy lot. This precise tracking ensures correct classification: older lots often qualify for long-term rates, while newer ones remain short-term. Incorrect matching could dramatically change your estimated tax liability.
Real-World Example
- You buy 2 BTC in January 2024 at $40,000 each.
- You buy 1 BTC in July 2024 at $60,000.
- In March 2025, you sell 2.5 BTC.
- The calculator uses both January coins first (long-term), then 0.5 from the July purchase (short-term).
The detailed breakdown table shows every individual match, so you can verify exactly how each portion of your sell was paired and taxed.
Strict FIFO matching provides the transparency and consistency most tax authorities expect by default.