How to Use

Ukcgt.xyz is intended to be used by the average private UK resident to calculate gains/losses on the disposal of shares to help you complete your annual HMRC Self Assessment. However, even if you did not dispose of any shares in the tax year, if you hold or held ETFs, you should declare any notional dividends that were paid in the tax year they were distributed (e.g. dividends from Accumulating ETFs). For a basic rate taxpayer, including ERI in your tax calculations (which you should do anyway) can reduce your capital gains tax bill!

NOTE: For GIA broker accounts only – ISAs and SIPPs are not taxable and should not be included in any tax calculations. ukcgt has not been tested with CFD broker account CSVs – CFD transactions should not be included as they may interfere with the calculations.

Overview

  1. Download ALL transaction files from all your brokers (usually as .CSV files) – ukcgt.xyz will combine all trades
  2. Load them into the ukcgt.xyz calculator and check the log for error messages and warnings
  3. Select a tax year and press the Calculate button – ukcgt.xyz will apply HMRC tax rules
  4. Check the error log for messages
  5. If you have ever bought ETFs – calculate the Excess Reportable Income by using the ERI_Lookup page and add the dividends into the calculator and press the Calculate button again.
  6. Use the reported tax year figures in your Self Assessment. Download and attach the calculator PDF HMRC Report and the ERI PDF Report (if applicable) to your SA.

Note: For other income from shares, etc. it is best to use the figures in your broker’s tax year report – e.g. interest from cash and share lending, distributed dividend income, etc.

Detailed Instructions

1. Broker Files

Check the Broker Formats pages for download instructions for different brokers. I suggest you name your download CSV files as below to avoid duplicating dates and trades (example for a Trading 212 account opened in 2023):

  • T212_raw_Start_to_2023.csv – from day opened account in 2023 to 31st Dec 2023
  • T212_raw_2024.csv – 1st Jan to 31st December
  • T212_raw_2025_csv – 1st Jan to 31st December
  • T212_raw_2026_to_14Oct2026.csv – last date must be at least 6 May (30 days after 5 April)

If you need to edit any CSV – use a text editor like Notepad and not a spreadsheet calculator because that may change the format of some data (e.g. date fields) when saving back as a CSV and the ukcgt.xyz parser may fail. Ukcgt.xyz expect raw downloaded files. If you do edit a downloaded broker file, change ‘raw’ to ‘mod’ or some other word to show that it has been modified by you.

All capital gains calculators require your complete trade history, starting from the day you first opened the accounts. Select all the files from all brokers to import into ukcgt,

2. UKCGT Calculator

Start by ensuring the web page cache is clear – hold down the Shift key on your keyboard and click the reload icon on your browser’s toolbar. This site is intended for use on a Desktop PC/Notebook – smartphones and tablets are not recommended.

Now click the ‘Choose file(s)’ button and select ALL your downloaded broker CSV files at once (I use Ctrl+left-mouse-click to select each one). For convenience, I keep all the broker CSV files in a folder named HMRC to make it easy to find.

Ukcgt.xyz will try to identify the broker (e.g. Trading 212 or Interactive Investor, etc.) from the CSV and load the files. The Calculations textarea will show you which files were imported and other information such as if stock splits were detected. You should check these messages carefully and make a note of any potential issues.

Next click ‘Calculate’ (there may be a delay of several seconds) and then check the new messages in the Calculations textarea. Ensure that the tickers have been identified correctly – the same ticker symbol – e.g. ABC, may exist as different companies on different stock exchanges in other countries. Also one broker may use a slightly different ticker name from another broker for the same shares. For instance Barclays do not seem to list the ticker symbol at all in their CSVs – ukcgt may import the trades as ticker TESCO but you may also have other trades in your T212 account identified as TSCO – in this case you should change all occurrences of TESCO to TSCO and recalculate.

For HMRC reporting, select the tax year that you require. You can sort the trades by date or ticker type – it will not affect the calculations.

If you have ever bought ETFs in any broker account, you should now calculate ERI…

3. ERI Lookup

Click the ‘Copy trades’ button and then open a new ERI_Lookup page.

Follow the instructions on the ERI_Lookup page (e.g. Paste the trades from the calculator in and press ‘Analyse’). Ensure the tax year is set to ALL.

Check the messages, note that not all ERI data may be available yet – in the example below, the ERI was notionally distributed on 30 June 2026 and so the missing data can be ignored because that only affects the 2026/2027 tax year…

Missing Data
DIVIDEND      30/06/2026  SWDA        1500.000  ???

Send the DIVIDENDS data to the ukcgt calculator by clicking the ‘Add to UKCGT trades‘ button.

Now go to the main calculator page and you should see some new DIVIDEND entries have been added.

Click ‘Calculate‘ again to include the new dividends as costs and recalculate gains/losses for the tax year.

Note: Due to delays in releasing ERI rates by the ETF producers, if you have missing ERI data, it is often necessary to wait until October/November before using a capital gains calculator when you have ETFs in your GIA account!

Reporting to HMRC

You can use the Listed shares (and unlisted shares) tax year totals in your HMRC Capital Gains page and attach a PDF (use the ukcgt ‘Save HMRC Report’ button and select the correct tax year). Other calculators may lump these two types together – the tax treatment is usually identical (i.e. unless you want to claim special tax relief you should not worry if any AIM shares have been mistakenly identified as listed shares or vice versa ;-).

Tax year summary
================
Category               Year     Disposal proceeds  Allowable costs  Net Gain/Loss
Listed shares          2025/26  £188,499           £179,969         £8,530       
Unlisted shares (AIM)  2025/26  £1,896             £1,720           £176  

You will also need to tell HMRC about any capital gains/losses from other sources such as CFDs or Crypto (note: any crypto exchange or sale counts as a taxable transaction – e.g. selling BitCoin and buying Ethereum counts as a taxable sale). Note that HMRC same-day and 30-day share matching rules also apply to CFDs and most broker reports do not allow for these HMRC rules.

Note that ukcgt.xyz does not carry forward losses from previous tax years – any unreported capital losses from previous years (up to 4 years) can be reported to HMRC, so check the ukcgt.xyz calculator results for losses in previous years and declare them in your HMRC self assessment report as previous CG losses which can be deducted from your gains.

You will also need to enter the ERI_Lookup results as Foreign Dividends and Foreign Interest on your SA form – select the correct tax year on the ERI_Lookup page.

FOREIGN INTEREST - ERI totals by ISIN country/prefix (information only):
None.
FOREIGN DIVIDENDS - ERI totals by ISIN country/prefix (information only):
IE (Ireland) = £481.50 (IRL)
LU (Luxembourg) = £51.17 (LUX)

You will need to add this notional Foreign Interest and Foreign Dividend data to any other overseas distributions you may have also received – e.g. add it to dividends from USA shares or dividends paid out by distributing ETFs in that tax year (check your annual broker reports).

As per HMRC rules, we should declare and pay tax on dividends even if the dividends were not actually paid out (e.g. Accumulating ETFs) but to ensure we are not taxed twice, we add the ERI dividend amount that was notionally paid, onto the cost of the shares in the calculator, thus reducing any capital gain tax when we eventually sell the ETF.

To obtain all UK and Foreign Interest and UK and Foreign Dividends data, you will need to collate the figures from all your bank, building society and broker tax year reports, etc.

Note: I am not an accountant or tax adviser – please treat this site as a guide and useful tool – it is your responsibility to report your tax figures correctly.

Scroll to Top