Trading Bot Taxes UK: Capital Gains, Losses and Reporting

Profits made by a trading bot are taxable in the UK. The trading bot taxes UK individuals owe are almost always Capital Gains Tax, because HMRC treats buying and selling assets, including cryptoassets, as investment activity subject to CGT on each disposal. Only in exceptional cases, where the frequency, organisation and sophistication of the activity meet the badges of trade, does HMRC classify it as a financial trade taxed under Income Tax and National Insurance. This page covers CGT rates, share-matching rules, allowable costs and record-keeping for automated trades.

On this page
  1. How HMRC Decides Whether Your Bot Is Trading or Investing
  2. What Counts as a Disposal
  3. Share-Matching Rules and High-Frequency Bots
  4. Allowable Costs, CGT Rates and the Annual Exempt Amount
  5. Reporting Gains and Claiming Losses
  6. CFDs, Spread Betting, ISAs and HMRC Data Powers
  7. FAQ

How HMRC Decides Whether Your Bot Is Trading or Investing

HMRC's Cryptoassets Manual (CRYPTO20250) states that 'only in exceptional circumstances would HMRC expect individuals to buy and sell exchange tokens with such frequency, level of organisation and sophistication that the activity amounts to a financial trade in itself.' If the activity is not a financial trade, it is investment activity and Capital Gains Tax applies to each disposal.

If HMRC does classify the activity as a financial trade, profits are taxed under Income Tax and subject to National Insurance contributions. The test draws on the badges of trade set out in the Business Income Manual (BIM20205). HMRC considers nine factors, including the number of transactions, the time between purchase and sale, the profit-seeking motive and the method of sale. No single factor is decisive.

Running a trading bot does not, by itself, make you a trader for tax purposes. A DCA bot that buys once a week looks very different from one placing thousands of intraday scalps, yet even a high-frequency bot typically falls under CGT because HMRC's stated position reserves the trading classification for exceptional circumstances. The key question is whether the whole operation resembles a business, not simply whether the software is fast.

What Counts as a Disposal

Each time your bot closes a position or swaps an asset, it may create a chargeable disposal for CGT purposes. For automated traders, the most common disposals are:

A bot running a grid strategy or a scalping setup can generate hundreds of disposals in a single day. Each one must be accounted for individually when calculating your gains and losses.

Bot activityTax treatment (most individuals)What to record
Selling crypto for GBPCGT on the gain or lossDate, asset, quantity, GBP value, fees
Token-to-token swapCGT on each side of the swapBoth assets, quantities, GBP values at time of swap, fees
Spending cryptoCGT on the gain or lossDate, asset, GBP value of goods or services, fees
Gifting (not to spouse)CGT based on market value at time of giftDate, asset, market value in GBP
Holding without disposingNo disposal, no CGT eventAcquisition cost for future reference
Receiving staking or mining rewardsIncome Tax on receipt; CGT on later disposalGBP value at receipt, then disposal details later

Share-Matching Rules and High-Frequency Bots

When you dispose of fungible tokens or shares, HMRC applies three matching rules in a strict order to determine which acquisition cost offsets the disposal. The Cryptoassets Manual (CRYPTO22200 series) confirms the same rules apply to tokens as to shares:

  1. Same-day rule (TCGA1992/S105): tokens acquired on the same calendar day as the disposal are matched first. All same-day acquisitions are treated as a single transaction, and all same-day disposals likewise.
  2. 30-day rule (TCGA1992/S106A): tokens acquired within 30 days after the disposal are matched next. This is the anti-bed-and-breakfasting rule.
  3. Section 104 pool (TCGA92/S104): any remaining disposal quantity is matched against the pooled average cost of all tokens of that type you hold.

For a high-frequency bot, the same-day and 30-day rules dominate. If a bot buys and sells the same token several times in one day, the same-day rule collapses all those acquisitions and disposals into aggregated transactions. If a bot sells a token and rebuys within 30 days, the cost of the new acquisition replaces the pooled cost for matching purposes.

The practical effect is that a bot doing rapid round trips cannot simply rely on the section 104 pool average. Each trading day must be reconciled against the same-day rule first, then any disposals still unmatched must be checked against purchases in the following 30 days, before anything falls through to the pool. Accurate, timestamped trade logs are essential for getting this right.

Allowable Costs, CGT Rates and the Annual Exempt Amount

When calculating the gain or loss on each disposal, you deduct allowable costs under TCGA1992/S38. HMRC's Cryptoassets Manual (CRYPTO22150) lists the following:

Mining equipment and electricity costs are not allowable acquisition costs. For token-to-token swaps, HMRC accepts a 50/50 split of the exchange fee between the asset disposed of and the asset acquired.

For the 2026-27 tax year (from 6 April 2026), the annual exempt amount for individuals is £3,000. Gains within this allowance are not taxed. Above it, CGT is charged at 18% for gains falling within the basic rate Income Tax band (up to £37,700 of taxable income for 2026-27) and 24% for gains exceeding that band.

Every fee your bot pays on each trade counts as an allowable cost and directly reduces your taxable gain. Detailed fee records therefore have a real effect on your bill. For a breakdown of common exchange fee structures, see the guide to trading bot fees.

Reporting Gains and Claiming Losses

You report capital gains to HMRC through Self Assessment, using the SA108 Capital Gains summary supplementary pages alongside your SA100 tax return. For disposals other than UK residential property, you can also use HMRC's online real-time Capital Gains Tax service. The Self Assessment deadline is 31 January following the end of the tax year.

If your bot makes a net loss on disposals in a tax year, you can report that loss to HMRC and carry it forward to offset gains in future years. The deadline to claim a loss is four years after the end of the tax year in which the disposal occurred. Losses from the current year are applied first; unused losses from earlier years can then reduce your gain, but only down to the level of the annual exempt amount.

You cannot claim losses on disposals to your spouse or civil partner, or to connected persons such as close family members.

Records to keep for each trade

For every disposal your bot executes, record the date, asset name, quantity, sterling value at the time of the transaction, and all fees paid. Your bot's exported trade log, combined with a reliable sterling valuation source such as the exchange's own price data, provides the raw material for your CGT calculations. Organising this data in a trading journal makes Self Assessment significantly easier, especially when you have hundreds or thousands of transactions per year.

CFDs, Spread Betting, ISAs and HMRC Data Powers

CFDs: For individuals not carrying on a financial trade, gains and losses on contracts for difference are chargeable to CGT under TCGA92/S143 (HMRC Capital Gains Manual, CG56100). All account debits and credits, including commission, are folded into the CGT calculation when the position closes.

Spread betting: HMRC's Capital Gains Manual (CG56105) states that 'no assets are acquired or disposed of and no chargeable gains or allowable losses arise' from spread betting. For most individuals, spread betting profits are outside both CGT and Income Tax. Whether a broker permits automated or bot-driven spread betting is a question of that broker's terms, not tax law.

ISAs: Gains inside a Stocks and Shares ISA are free of CGT. Some providers offer API access that could support automated strategies, but availability varies. Check the provider's terms before running a bot inside an ISA wrapper.

HMRC data access: The UK's Cryptoasset Reporting Framework (CARF) came into effect on 1 January 2026. UK reporting cryptoasset service providers must now collect data on their users' transactions and tax residency. The first reports to HMRC are due between 1 January 2027 and 31 May 2027, covering the 2026 calendar year. Data on non-UK resident users will also be exchanged internationally. If your bot trades crypto through a UK-registered exchange, HMRC will receive a record of your activity.

This is not financial advice. This is not tax advice. For US-specific rules such as wash sales, see the general guide to trading bot tax implications.

Not financial advice. This content is educational. Automated and algorithmic trading carries a real risk of financial loss. Never trade money you cannot afford to lose. Review the SEC investor.gov and CFTC resources before trading.

Frequently asked questions

Do I pay Capital Gains Tax on every trade my bot makes?

Each disposal your bot executes is a separate CGT event. A disposal includes selling for fiat, swapping one token for another, or spending crypto. You calculate the gain or loss on each disposal, then offset your annual exempt amount and any carried-forward losses against the total for the tax year.

Does running a trading bot make me a trader for HMRC purposes?

Not automatically. HMRC's Cryptoassets Manual states that it would only expect trading classification in exceptional circumstances. The test looks at the overall badges of trade, including frequency, organisation and profit motive. Using a bot is one factor, but it does not by itself shift the classification from investment to trading.

Can I deduct my bot's exchange fees from my capital gains?

Yes. Exchange fees paid when buying or selling tokens are allowable costs under TCGA1992/S38, as confirmed in HMRC's Cryptoassets Manual (CRYPTO22150). Network and gas fees for on-chain transactions also qualify. Keep a record of every fee for each trade so you can deduct them when calculating your gain or loss.

How long do I have to report a capital loss to HMRC?

You have four years after the end of the tax year in which the disposal occurred. For example, a loss realised in the 2026-27 tax year (ending 5 April 2027) must be claimed by 5 April 2031. Report it on your Self Assessment return or write to HMRC if you are not registered for Self Assessment.

MB

Mustafa Bilgic

Algorithmic trading practitioner · Founder, AITradingBot.us

Mustafa builds and backtests automated trading systems and writes about them without the hype. Every tool on this site is free and runs entirely in your browser.

Sponsored: recommended resources →