Tax-loss harvesting is the practice of closing a losing position deliberately, before a tax year ends, so the realized loss can offset a realized gain elsewhere in the same filing. It works only where a jurisdiction's tax code allows a capital loss to reduce a capital gain, and the rules on how much of that offset is allowed, whether it carries forward to future years, and whether repurchasing the same asset shortly after selling it disqualifies the loss all vary by country.
The mechanic is simple: a trader holding one position at a loss and another at a gain closes the losing position before the tax year ends, realizes the loss for tax purposes, and uses it to reduce the taxable gain on the winning position. Because tax is generally owed only on realized gains, a trader with a large unrealized gain and a separate unrealized loss can choose the timing of the loss to fall in the same tax year as the gain. The technique does not create value on its own — it only changes the timing, and in jurisdictions that allow it, the tax treatment of a loss that has already occurred; a trader still holds less capital after closing a losing position than before opening it.
A perpetual contract realizes a loss the moment a losing position is closed, exactly like a spot sale, and that realized loss enters the same capital-gains calculation as any other closed trade. Funding payments complicate the total: a string of funding payments made while a position was held adds to its effective cost and reduces the net result at close, and in jurisdictions that treat funding as ordinary income or expense separate from the capital gain or loss, those payments may need to be tracked and reported separately from the trade's price-based gain or loss. See how crypto trading is taxed for the underlying framework.
A wash-sale rule disallows a claimed loss where the seller repurchases the same or a substantially identical asset within a short window before or after the sale — the rule exists to stop a trader from harvesting a loss for tax purposes while keeping the economic position unchanged. In the United States, the wash-sale rule as written applies to securities and has not, at the time of writing, been extended by statute to property, the category digital assets fall under for federal tax purposes — a distinction that has let US crypto traders realize a loss and reopen a similar position without the waiting period a stock trader faces. That treatment is specific to how digital assets are classified in US law and does not transfer automatically to every jurisdiction; several countries apply an anti-avoidance rule to crypto derivatives regardless of asset classification, so a trader should confirm the local rule before assuming the US treatment applies elsewhere. The practical effect of the US treatment is that a trader can, in principle, close a position at a loss to realize it for that year's filing and reopen a similar position soon after to keep the underlying market exposure — something a stock trader cannot do without waiting out the wash-sale window or accepting that the loss will be disallowed. Because this rests on the property classification, a change in how digital assets are classified for tax purposes would change the analysis, which is one more reason to confirm the current rule.
Only a realized loss — one from a position that has actually been closed — typically offsets a gain; an open position sitting below its entry price has no tax effect until it is closed, however deep the drawdown. This is the reason the harvesting decision is a timing decision: a trader with an unrealized loss chooses whether and when to convert it into a realized one, and that choice interacts with whatever losses and gains have already been realized elsewhere in the same account during the same tax year. A trader running several open positions at once can end a tax year with some at a gain and others at a loss; harvesting is the decision to realize enough of the losing side, before the year closes, to offset the gains already locked in.
Claiming a loss requires the same documentation a gain does: entry price, exit price, every funding payment over the life of the position, and fees paid on both sides, each converted to the filer's home currency at the rate on the date it occurred. A loss that cannot be substantiated with this record is a loss a tax authority can disallow on review, which makes exporting a full trade history before a filing deadline as important for a loss as it is for a gain. This documentation burden is the same whether the loss comes from a single large position or from harvesting several smaller ones across a year, which is why traders who harvest losses regularly tend to export records more often than once a year.
Whether a loss offsets a gain, whether it carries forward, and whether an anti-avoidance rule applies to a specific repurchase all depend on the filer's jurisdiction and on rules that change from year to year. This page explains the mechanism; it is not a recommendation to harvest a specific loss, and a trader planning around a tax-year deadline should confirm the current rule with a licensed tax professional before acting.
Tax-loss harvesting is closing a losing position before a tax year ends so the realized loss can offset a realized gain in the same filing. It only reduces tax owed where the jurisdiction's tax code allows a capital loss to offset a capital gain, and the offset rules vary by country.
Writing off crypto usually means claiming a realized capital loss from closing a position at less than its cost basis, which can reduce taxable gains elsewhere in the same filing. It requires a genuinely closed position and full documentation of entry, exit, fees and funding payments; it is not the same as simply holding a losing position.