The short answer is that you owe tax on realized gains, calculated by subtracting your cost basis from your proceeds on every taxable event. The longer answer involves understanding what counts as a taxable event, which cost basis method applies, and how income events — staking rewards, airdrops, mining — differ from capital gains.
This covers the US framework, which the IRS has addressed in multiple guidance documents since 2014. Tax treatment varies by jurisdiction; the UK, EU, and most other major markets follow broadly similar logic but differ on specifics. Nothing here is tax advice.
The IRS treats cryptocurrency as property, not currency. That single classification drives everything else.
Taxable disposals include:
Income events — taxed as ordinary income, not capital gains — include:
What doesn't trigger a taxable event: buying crypto with fiat and holding it. Transferring between wallets you own. Those change custody, not realization.
Capital gain = Proceeds − Cost Basis
Proceeds is the fair market value of what you received when you sold or exchanged the crypto — typically the USD price at the moment of the transaction.
Cost basis is what you originally paid to acquire the crypto, including acquisition fees.
Short-term vs long-term depends on how long you held the asset before disposing of it. In the US, assets held one year or less are taxed at ordinary income rates (up to 37%). Assets held longer than one year qualify for long-term capital gains rates (0%, 15%, or 20% depending on your income bracket). The holding period begins the day after acquisition.
A simple example: you buy 1 ETH for $2,000 and sell it six months later for $3,000. Proceeds: $3,000. Cost basis: $2,000. Short-term capital gain: $1,000 — taxed at ordinary income rates because you held it less than a year.
When you've bought the same asset at multiple prices over time, you need a method to track which units you're disposing of when you sell a partial position.
FIFO (First In, First Out): The oldest units are sold first. This is the IRS default. In a rising market, it tends to produce higher gains because older purchases typically had a lower cost basis.
HIFO (Highest In, First Out): Units with the highest cost basis are sold first, minimizing taxable gain per transaction. It requires meticulous per-lot tracking to use correctly.
Specific Identification: You designate exactly which units you're selling at the time of disposal. The most tax-efficient option in many situations, but only valid if you maintain adequate records identifying the specific purchase lot — date, price, amount.
You can't retroactively change methods for past transactions. Tax software typically lets you select or optimize per-transaction; the IRS accepts specific identification if adequate contemporaneous records exist.
Straightforward spot trading on centralized exchanges is the easy case — every buy and sell has a clear price, timestamp, and counterparty. DeFi adds layers that standard cost basis tools don't handle cleanly.
Liquidity pool positions: When you deposit two tokens into an AMM pool, there's an argument the swap between assets upon deposit is a taxable event. When you withdraw, the ratio of assets you receive may differ from what you deposited due to impermanent loss or fee accumulation. The IRS hasn't issued specific guidance here. Current practice among crypto tax professionals generally treats deposit and withdrawal as taxable events, but this remains genuinely unresolved.
Wrapped tokens: Converting ETH to WETH — or any similar wrapping operation — may constitute a taxable swap in the IRS view. The argument against is that the underlying economic position hasn't changed. Neither position has been formally ruled on.
Token bridges: Moving assets across chains via a bridge may involve a token swap under the hood. Whether the bridged asset carries a different cost basis than the original is an open question.
The pattern: DeFi's complexity outpaces the guidance. Reasonable positions exist on multiple interpretations. Document everything.
The binding constraint is record-keeping. Every taxable event requires the date of the transaction, the amount involved, and the fair market value at the time. For trades on US centralized exchanges, 1099-B and the incoming 1099-DA forms provide this. For on-chain activity, DEX trading, or foreign exchanges, the burden sits entirely with the taxpayer.
Crypto tax software — Koinly, CoinTracker, TaxBit, Coinpanda, and others — connects to exchanges and wallets via API, imports transaction history, and attempts to calculate cost basis across accounts. These tools work well for standard trading history; complex DeFi activity — multi-step transactions, liquidity pool positions, yield aggregators — often requires manual review and judgment calls.
The harder the history is to reconstruct later, the more valuable it is to track it in real time.
The IRS has increased enforcement and matching capacity for crypto. The 1099-DA requirement — extending broker-style reporting to crypto exchanges — phases in starting with the 2025 tax year. For DeFi specifically, the IRS proposed rules in 2024 that would extend reporting obligations to DEX operators; those rules faced legal challenges and the final scope was unresolved as of mid-2026.
The wash-sale rule, which prevents investors from harvesting losses by immediately repurchasing the same asset, currently doesn't apply to cryptocurrency (unlike stocks). Extending wash-sale treatment to crypto has appeared in multiple legislative proposals but hasn't passed.
Expanded 1099-DA filing with meaningful IRS matching activity. Settled legal status for DeFi broker reporting rules. Legislative clarity on staking income treatment — whether rewards are income at receipt or at disposal. These would each reduce ambiguity in the current guidance framework.
A legislative like-kind exchange treatment for crypto would mean crypto-to-crypto trades no longer trigger immediate realization. That would fundamentally change the calculation mechanics. No active legislative path to this currently exists. Extension of wash-sale rules to crypto would change loss harvesting strategies without affecting the gain calculation mechanism itself.
Now: Every trade, swap, and yield event creates a record requirement. Reconstructing years of history later is much harder than maintaining it as transactions occur. If you've been active for multiple tax years without tracking, that work needs to happen before filing.
Next: 1099-DA reporting expands. Tax software accuracy improves as exchanges integrate directly. DeFi reporting obligations likely settle in some form.
Later: Legislative clarity on staking, NFT activity, and DeFi yield treatment. These remain actively debated policy questions.
This post explains how the crypto tax calculation mechanism works under current US IRS guidance. It doesn't address your specific situation, doesn't substitute for a qualified tax professional, and doesn't cover the full range of international tax frameworks.
If your transaction history is complex — multiple years of DeFi activity, liquidity positions, staking across protocols — a crypto-specialized CPA is worth the cost. The cost of getting this wrong, particularly with the IRS's expanding enforcement capacity, tends to exceed the cost of professional guidance.
The mechanism works as described. Whether it applies cleanly to your history depends on factors outside this scope.




