Exchange CSV to capital gains worksheet
Open the export of your buys and sales and pick the lot method and how fees are handled. Each sale is matched to the lots it came from, giving the acquired date, disposed date, quantity, proceeds, cost basis, and gain or loss per row. Only rows typed as a buy or a sale are used: transfers, rewards, and conversions or swaps of one coin into another are listed and counted, not matched. Lots are pooled per asset across every account or wallet in the file. Quantities are whole units of 0.00000001 and money is whole cents, so nothing drifts.
The export is read in your browser and stays on this device. Nothing is uploaded.
The file is read in this browser and is not uploaded.
Matched from the header words. Check them and change any that are wrong. Only rows typed as a buy or a sale are used. Transfers, rewards, and conversions or swaps of one coin into another are not matched; they are listed with their row numbers and counted in a warning.
Both are your choice; neither is picked for you. Lots are pooled per asset across every account or wallet in the file; the account column is not used to keep lots apart.
Summary
Worksheet: one row per lot sold
Sales larger than the holdings
Quantity sold with no earlier buy in this export. It is listed here and is never given a zero cost basis.
Lots still held
This is a worksheet of your own trades under the method you picked. It is not a tax form and is not in any agency's form layout.
What gets checked
- A second lot engine, written a different way, agrees with the worksheet on which lots every sale took from, on the quantity and cost basis of each, and on what is left of every asset.
- Every worksheet row belongs to a real buy and a real sale of its own asset and carries their dates and times.
- Quantity is conserved for every asset: bought minus sold equals what is left.
- Every lot is conserved on its own: what was sold from it plus what is left equals what was bought, in quantity and in cost.
- Each row's cost basis is its lot's cost times the quantity taken divided by the lot's quantity, rounded to the cent, tested row by row.
- Each sale's own proceeds are split over its rows by quantity, to the cent, so proceeds moved from one sale to another fail; worksheet proceeds plus proceeds of any unmatched quantity equal total sale proceeds.
- Gain or loss is proceeds minus cost basis on every row.
- Acquired and disposed are real calendar dates and times, and every lot was acquired on or before the time it was sold.
- No sale is larger than the holdings before it. A sale that is larger is listed by row and is never given a zero cost basis.
- A warning when the trades come from more than one account or wallet, because lots are pooled per asset across all of them.
- A warning that counts and lists every row left out because its type is neither a buy nor a sale (transfers, rewards, conversions or swaps).
- Every row with data is accounted for: used, listed as left out (with its row number and the reason), or listed as unreadable. An unreadable row marks the result not verified.
How it works
- Open your export. Drop the transaction export (.csv or .xlsx) with buys and sales. It is read in the browser.
- Check the column mapping. Date and time, type, asset, quantity, total cost or proceeds, and fee are matched from the header words and can be changed. Rows that are neither a buy nor a sale (transfers, rewards, conversions or swaps) are not used; each is listed with its row number and counted in a warning on the certificate.
- Pick the method and the fee rule. First in, first out takes the oldest lot; highest cost first takes the lot with the highest cost per unit. Fees are either added to cost and subtracted from proceeds, or left out. Neither choice is made for you.
- Review and export. The worksheet, any sales larger than the holdings, the lots still held, and the verification certificate are shown. Download Excel or CSV, or print.
Worked example
A made-up export: buy 1 BTC for $30,000.00 with a $30.00 fee on January 5, buy 0.5 BTC for $20,000.00 with a $20.00 fee on February 10, sell 0.3 BTC for $15,000.00 with a $15.00 fee on March 15, and sell 0.9 BTC for $36,000.00 with a $36.00 fee on April 20. Method: first in, first out. Fees added to cost and subtracted from proceeds.
| Quantity | Date acquired | Date disposed | Proceeds | Cost basis | Gain or loss |
|---|---|---|---|---|---|
| 0.3 | 2026-01-05 | 2026-03-15 | $14,985.00 | $9,009.00 | $5,976.00 |
| 0.7 | 2026-01-05 | 2026-04-20 | $27,972.00 | $21,021.00 | $6,951.00 |
| 0.2 | 2026-02-10 | 2026-04-20 | $7,992.00 | $8,008.00 | -$16.00 |
Proceeds $50,949.00, cost basis $38,038.00, gain $12,911.00. The 0.3 BTC still held carries $12,012.00 of basis, and $38,038.00 + $12,012.00 = $50,050.00, the total cost of both buys with fees. With highest cost first on the same export, cost basis is $41,041.00 and the gain is $9,908.00.
The example uses made-up names and numbers.
Questions
Which method does the tool use?
The one you pick. It offers first in, first out and highest cost first, and it does not pick one or say which applies to you.
How is a partial lot's cost worked out?
Cost taken is the lot's cost times the quantity taken divided by the lot's quantity, rounded half away from zero to the cent, in whole-number math. What is not taken stays with the lot, so a lot's pieces always re-add to its cost exactly.
What if I sold more than the export shows I bought?
The part of the sale with no lot is listed by row with its quantity and the part of the proceeds that goes with it, and the worksheet is marked not verified. It is never treated as having a zero cost basis. This usually means coins came in from somewhere the export does not cover.
Does it keep accounts or wallets apart?
No. Lots are pooled per asset across every account or wallet in the file, and the account column is not used when a sale is matched to a lot. When the file names more than one account, a warning on the certificate says so and names them.
What about conversions, swaps, transfers, and rewards?
They are not used. Only rows whose type reads as a buy or a sale become lots or sales. Every other row is listed with its row number and type and counted in a warning on the certificate, so a sale of coins that arrived by transfer or conversion shows up as larger than the holdings.
How is the worksheet checked?
Twice over. A second lot engine, written a different way, works one asset at a time and computes the cost that stays in each lot instead of the cost taken; it must agree with the worksheet on every lot of every sale and on what is left. Then each row is tested on its own, without division: its cost against its own lot, its proceeds against its own sale, and its dates against the buy and the sale it points at.
Is this a tax form?
No. It is a worksheet of your own trades in its own layout. It is not an agency form and it does not say what to report.
This tool calculates and checks numbers. It is not legal, tax, or medical advice.