App Usage
How does this UK capital gains tax calculator work?
Upload a formatted data file or paste your transaction history into the calculator. Check that there are no flagged errors, review the data in the preview table, and then click 'Calculate gains'. The calculator matches every disposal against your acquisitions using HMRC's share matching rules: same-day, then the 30-day 'bed and breakfast' rule, then the section 104 pool, and finally any later purchases for a sale bigger than the shares held, before applying the annual exempt amount per tax year. See the worked examples for the full detail.
How do I combine trade data from different brokers?
The source of the data does not matter, provided you include the mandatory fields and use consistent formatting. After standardising each broker's data to match the calculator's required header and data formats, you can upload the files together, or append each broker's data, one after the other, in a single CSV or TXT file. You do not need to sort the data; the calculator sorts the transactions during processing. Values in a foreign currency need a currency code in the optional currency columns, and values in pence (GBX) are converted to pounds automatically. Ensure date formatting is consistent between brokers.
If easier you can load and combine data in Excel and save the active sheet as a CSV, TXT or TSV as the source file for the calculator. Although Excel file input is valid, multisheet files may cause issues.
See the format guide.
How do I report capital gains on my Self Assessment tax return?
The results are broken down per tax year into gains, losses, the annual exemption (the 'annual exempt amount'), and the chargeable gain - providing the figures that map directly onto Self Assessment's Capital Gains Summary (SA108). The results 'Calculation text' gives a full disposal-by-disposal narrative if HMRC ever queries a figure. However the data is provided without full context of your personal situation, and with caveats, so confirm the data first with a tax professional.
How do I format my CSV data for accurate calculations?
The calculator detects the delimiter automatically: comma, semicolon, tab or pipe, as long as the same one is used throughout the file. CSV is typically safer as Excel files can mangle or truncate data (and dates) through local formatting. For consistency CSV or TXT files are recommended. Currently there is no functionality to ingest JSON format files.
Can the calculator track multiple different stock accounts simultaneously?
Yes. You can upload several files in one calculation, for example one from each broker, and the calculator combines them before matching. You can also combine the transactions into a single input file yourself.
What should I do if the calculator flags an error?
The initial error message will provide users with a starting point for self-diagnosis. The preview table will show how the input data has been converted to columns when ingested. Typical issues are invalid date formats (i.e. not UK or ISO), incorrect column header names, or invalid number-column values. Sometimes invalid non-printing characters can create issues if in the source data.
Should issues persist, please get in touch via the feedback form. Any bug should be reported for a prioritised response.
Additional feature requests are most welcome, which can also be requested through the feedback form.
Capital Gains Rules
What are the HMRC share matching rules used here?
Every sale of the same share, of the same class (i.e. the same fungible instrument, such as a crypto asset) is matched against buys of the same share and class in a fixed order. First any purchase on the same day, then purchases in the following 30 days, then the section 104 pool (the average cost of your whole remaining holding). This is the order HMRC's own rules require, see matching rules for the worked detail.
There is a fourth rule, which applies only if a sale is bigger than all three can cover: the rest of the sale is matched against later purchases, the earliest first (TCGA 1992 s105(2)). This is very rare for a private investor, so the calculator shows a reminder when it happens: it usually means a purchase is missing from your data.
How does the 'same-day' rule apply to share trading?
If you buy and sell shares in the same company (share and class, or crypto asset) on the exact same day, HMRC dictates these transactions must be matched together first, regardless of the time of day the trades were executed. They are isolated from your broader Section 104 pool.
How does the 'bed and breakfast' rule work?
If you sell shares and then buy back the same investment within the following 30 days, HMRC rules require the sale to be matched against that future repurchase, rather than against your historic s104 pool. This means the gain or loss on the disposal is calculated using the cost of the later acquisition rather than the historic pooled cost. Only after the applicable 30-day acquisitions have been matched does any remaining disposal get matched against the Section 104 pool. The calculator applies this rule automatically, and on a FIFO basis; a match made this way shows as '30 day' match in your results.
What is a Section 104 pool?
A Section 104 pool (or holding) is HMRC's method for grouping together shares or units of the same class in the same company/fund for capital gains tax purposes. Each purchase increases the pool's total allowable cost and quantity. When you sell shares that aren't matched by the same-day or bed and breakfast (30 day) rules, they're matched against the pool using its pooled average cost per share. The calculator tracks separate pools per instrument automatically.
Do I need to report my gains if they are below the Annual Exempt Amount?
You may still need to report your capital gains even if your gains are below the Annual Exempt Amount. For example, if your total proceeds from chargeable disposals exceed £50,000 from 2023/2024, you may need to report the disposals on your Self Assessment tax return, even if you made no gains, or made a loss.
How is my tax-free allowance split if my gains fall either side of a CGT rate change, as in 2024–25?
CGT rates rose partway through the 2024-25 tax year, on 30 October 2024. If your gains for that year fall on both sides of that date, the calculator's default is to use your tax-free allowance, or 'Annual Exempt Amount', against the higher-rate period first, and only allocate any left over allowance against the lower-rate period, as this will generally provide the most beneficial result.
Worked example. Say you made £4,000 of gains before 30th October 2024 and another £4,000 after it, £8,000 for the year, with the 2024-25 allowance of £3,000. The calculator uses the full £3,000 against the post 30th October gains first, since those are taxed at the higher rate:
- Pre 30th October: £4,000 gain, £0 allowance used → £4,000 chargeable
- Post 30th October: £4,000 gain, £3,000 allowance used → £1,000 chargeable
- Total chargeable for the year: £5,000
If your post 30th October gains had instead been smaller than the allowance, say £1,000, the calculator would use £1,000 of the allowance there and carry the unused £2,000 across to reduce your pre 30th October gains too, so no part of your allowance goes to waste. And if either period was a loss rather than a gain, that loss is used to offset the other period's gain first, before the allowance is applied at all.
This default won't be right for everyone. The most tax-efficient split ultimately depends on your overall Income Tax position for the year (which band you fall into) and on any other gains you've made outside this calculator, neither of which the calculator can see. If you're unsure whether the default allocation is right for you, it's worth checking with an accountant or tax adviser.
What happens if I make a capital loss?
Capital losses must first be offset against any capital gains made in the same tax year. If your total losses exceed your total gains, the remaining loss can be carried forward indefinitely to offset against future capital gains. Losses must be reported to HMRC within four years of the end of the tax year in which they were realised, should you want to utilise these later.
Do I need to calculate gains for investments held in an ISA or SIPP?
No. Investments held within UK tax-advantaged wrappers, such as a Stocks & Shares ISA or a Self-Invested Personal Pension (SIPP), are exempt from Capital Gains Tax. You generally only need to use this calculator for assets held outside tax-advantaged wrappers, such as in a General Investment Account (GIA) or certain personal crypto holdings, though you should first aggregate all non Capital Gains Tax-exempt assets and transactions from different sources to ensure correct matching by the calculator.
Corporate Actions & Allowances
How are stock splits and consolidations handled for Capital Gains Tax?
Stock splits and consolidations are treated as a reorganisation of share capital, not a disposal. You do not pay Capital Gains Tax when they happen. The new shares simply take on the original base cost of the old shares, adjusted proportionally for the new quantity.
How do bonus issues affect my allowable cost?
When you receive free bonus shares, they are added to your existing holding (usually your Section 104 pool). Your total allowable cost does not change, but because you now own more shares, your average cost per share decreases.
What is Excess Reportable Income (ERI) and how is it taxed?
Many Offshore Reporting Funds (including popular ETFs - applicable to both distributing and accumulation types) accumulate income internally rather than paying it out as dividends. For UK taxpayers, this accumulated income not otherwise distributed, known as Excess Reportable Income (ERI), is taxable as income. To prevent double taxation, the ERI you report as income also increases your base cost for Capital Gains Tax purposes. This Calculator processes provided ERI values against the applicable holdings, providing reportable income values and adjusting base costs, included to any unmatched pools. ERI is still reportable (and taxable) even if the holding has not been disposed of.
Be aware that under HMRC rules, ERI is treated as received for income tax purposes six months after the fund's accounting year ends, which can push the income tax liability into the following tax year. The distribution date's impact is reflected in the calculation's output.
How do I handle Notional distributions from UK domiciled accumulation funds, and Equalisation?
UK-domiciled funds are treated differently to Offshore reporting funds, having Notional and Equalisation values. Equalisation affects both accumulation and distribution funds, while notional distributions apply exclusively to accumulation funds.
For a UK-domiciled accumulation fund, income is reinvested rather than paid out. That notional distribution is taxable as income, and exactly like ERI it is added to your allowable cost so you are not taxed on the same money again when you sell.
Unlike ERI which reports as per unit value, NOTIONAL is reported as a total value on the distribution date, and is taxed in the same tax year. See Examples for how Notional values can be included in the calculation.
If you bought units part-way through a distribution period, the first distribution also includes an equalisation element, which is a return of your own capital rather than income; enter that separately as an EQUALISATION row (total amount in the price column, units blank), and it reduces your allowable cost. Each purchase will require its own values, provided to you by the fund's manager.
Use NOTIONAL for UK-domiciled accumulation funds and ERI for offshore reporting funds. Offshore accumulating funds that are not reporting funds are taxed differently again (offshore income gains) and are outside this calculator's scope.
Can I transfer shares to my spouse to reduce Capital Gains Tax?
Yes. Under HMRC rules transfers of assets between spouses or civil partners are treated on a 'no gain, no loss' basis. The receiving spouse takes over the original base cost, and the shares join their holding on the date of the transfer. This is a common strategy to utilise both individuals' annual Capital Gains Tax allowances. The calculator provides the base cost information for spousal transfers, and adjusts any remaining pool accordingly. The eligible couple must still be living together and not separated, and there are special rules which apply in the year of divorce.
How are trading fees and commissions factored into the calculation?
Incidental costs of buying and selling can be used to reduce your tax liability. Trading commissions (and UK Stamp Duty) are added to the acquisition cost of your shares, while selling fees are deducted from your disposal proceeds. The calculator allows for costs and any stamp duty provided to adjust the base costs or final selling price before matching.
What happens if a company goes bankrupt or a crypto token goes to zero?
If an asset you still own becomes worthless or of negligible value, you may be able to make a 'negligible value claim' to HMRC. A successful claim treats the asset as if it had been disposed of and immediately reacquired at its negligible value, allowing any resulting capital loss to be claimed.
Cryptocurrency & Foreign Exchange
Are cryptocurrencies subject to UK Capital Gains Tax?
Yes. HMRC does not view cryptoassets as currency or money, but rather as chargeable capital assets. If you buy and sell tokens like Bitcoin or Ethereum as a personal investment, your gains may be reportable, and any profits (above your annual tax-free allowance) are subject to Capital Gains Tax.
Do I have to pay tax if I just trade one cryptocurrency for another?
Yes. Exchanging one cryptoasset directly for another (for example, trading Bitcoin for Ethereum) is classified by HMRC as a taxable disposal of the first asset, and a purchase of the second. You must calculate the pound sterling (GBP) value of the disposed asset on the date of the trade to determine if you made a capital gain or loss.
How are calculations affected if I buy and sell shares in a foreign currency?
UK Capital Gains Tax is calculated in Pound Sterling (GBP). You must convert the purchase price into GBP using the exchange rate on the date of acquisition, and the sale price into GBP using the exchange rate on the date of disposal. If your platform or broker provides the FX rate, you should use that rather than a more general daily rate.
Where should I get the GBP exchange rates for crypto or foreign stocks?
HMRC requires all Capital Gains Tax calculations to be reported in GBP. For transactions made in a foreign currency or crypto, you must first convert the purchase and sale prices into GBP using an appropriate exchange rate for the actual transaction date. HMRC does not mandate any specific source for your rates; you can use a reputable provider such as the European Central Bank (which is what this calculator uses by default), the Bank of England, major financial data providers, or established crypto aggregators, but you must be consistent.
Do I need to use the exact same exchange rate source for every calculation?
Yes, consistency is key. While HMRC allows you to choose a reputable source for your spot rates, you must apply your chosen methodology consistently across all your trades. Avoid switching sources selectively where doing so could produce an artificially favourable result.
Precision & Accuracy
How precise are calculations for small cryptocurrency holdings?
Very precise. As an example, the calculation engine has been designed to handle Ethereum and other cryptocurrencies down to their smallest unit (wei for ETH, at the 18th decimal place). Whether you're trading whole coins or fractional holdings, the calculator tracks your cost and proceeds with high precision. This is especially important for tiny positions where premature rounding can adversely impact reportable results.
The calculation engine retains decimal precision during matching and only rounds figures for presentation and reporting. This helps avoid cumulative rounding errors, particularly where there are many small transactions. HMRC provides specific guidance in CG14200. As a result transactions are only reported to the rounded pence at the transaction level, and to the pound in aggregate.
How are fractional shares treated for Capital Gains Tax?
HMRC treats fractional shares exactly the same as whole shares. The same matching rules (same-day, 30-day, Section 104 pool and later purchases) apply to the fractions you buy and sell. Your allowable costs and proceeds are simply calculated proportionally based on the fraction of the share you transacted.
Privacy & Security
Is my data safe and private?
Your transaction data is sent to the server for processing, but is processed entirely in memory and discarded as soon as the response is sent back to you. Your transaction data is never written to disk, logged or shared.
However, the server does retain anonymised usage statistics, including the number of rows processed, the transaction types included and the calculation timestamp. No transaction details or information that could identify you from the processed data are stored. See the Privacy Policy for exactly what is and isn't recorded.