If you have a Trading 212 Invest account, you will probably need to calculate your Capital Gains tax after May 6th 2026.
Note that the annual report from Trading 212 does not account for the HMRC 30-day rule or the same day rule to determine which shares have been sold. Any sell is first matched against...
- Shares bought and sold on the same day
- Shares acquired within the 30 days after the sale (on a ‘first in, first out’ basis)
- The Section 104 holding pool (any other of the same type of shares: total paid / qty)
I have made a Windows executable that converts the .CSV files which you can download from Trading 212.
On the T212 site, select your Invest account and then use:
'Trading 212 - History'
and my program will convert your downloaded .csv file into a suitable text file (.txt) which you can then load into the free cgtcalculator.com online app.
The steps are:
1. Download your CSV files from Trading212.
T212 only allows 12 months at a time (stupidly). So if the first trade is older than 12 months ago, you need to download all CSVs for all years. Note that you should only select ORDERS.
| Example - Orders - only 12 months allowed! |
Note that, for HMRC reporting, you should do this after May 6th 2026 (30 days after tax year end) because of the 30-day rule. You need ALL orders in the CSV for all previous order buys/sells since you opened the account.
I suggest you use a start date of Jan 1 and an end date of 31 Dec for each download accordingly - e.g. T212_2024.csv, T212_2025.csv, etc.
2. Download and run the T212_convert.exe (version 11 or later). The .exe file can be copied to any folder or even your Desktop.
| Hold down Ctrl key and select each download file. |
You should see a box like this. If you are prompted about a stock split, it may be because there really was a stock split or it may be because there are missing orders (you have accidentally not included all dates in your downloads). Duplicate orders will be ignored, but you must not have missing orders.
You should check all stock split or oversell warnings/errors. In the screenshot above, the NFLX stock split has not caused an error because the orders have been adjusted, however CNQ seems to have undergone a stock split even though there was no stock split entry in the downloaded .csv file. The CNQ orders need to be fixed. The program can fix simple cases but you will need to check when the split occurred as it may have affected previous Buys and Sells.
The conversion program will parse 'Buy' and 'Sell' rows - including any Market Buy/Sell, Limit Buy/Sell and Stop Buy/Sell orders.
There are two main output files - one is a .csv file with headings, but the other is a .txt file suitable for input into the free cgtcalculator.com tool. The two files will have _CVT appended to the name (CVT=converted). In later versions there is also a warnings.csv file which you may find useful for finding errors by loading into Excel.
If you selected more than one file - a T212_Convert_Combined_Temp files will be created. Note that this file may be overwritten by later runs of the convert program.
If you need to manually edit the results, then you could also load the xxxx_CVT.csv converted file into Excel, make your changes and then select and copy all the data cells using Ctrl+C (not the heading row) and paste it into the cgtcalculator.com form using paste Ctrl+V.
3. Go to the cgtcalculator.com site and click on 'Choose File' and then select the _CVT.txt file.
- Now click on 'Format/Sort' and check it looks OK (optional - it sorts by date)
- Ensure the 'apply rounding' option is unchecked - see picture below.
- Enter the desired tax year if you don't want all years.
- Finally click on the red CALCULATE button.
cgtcalculator.com conversion programs for Windows
The .exe program is written in Python and has then been compiled into a Windows .exe. I used ChatGPT to make it for me since I don't know Python very well.
Action of T212_convert (latest version 11.5)
- Read in .csv - this may contain multiple files and duplicate lines. Files containing orders can be downloaded from T212 - ALL ORDERS for ALL YEARS must be downloaded and added to the one file - if you held the account for 6 years then all trades for all 6 years are needed. Downloads for the last year must be done after May 6th as trades up to 30 days after the tax year may affect the calculations. Later versions (v11+) allow you to select multiple files from a Windows pop-up.
- Check and sort Buy and Sell orders
- Adjust Qty and Price in shares if a stock split is present or detected
- Check for Oversells (selling more shares than you hold) and small discrepancies (e.g. hold 9.0 but sell 9.0000001 shares)
- Check for any Buy within 30 days of a sell (HMRC same day and 30-day rules will apply when processed later) - warn user
- List number of Buys and Sells
- List files output inc a Warnings .csv and a .csv which user can manipulate and then cut and paste into cgtcalculator.com
- List orders which have been changed by the program (due to small discrepancies, splits, etc.)
- The .txt file can be directly imported into cgtcalculator.com
Note: Sometimes, in cgtcalculator.com, the sells do not match the buys by a very small amount due to very small decimal errors (the sells in the T212 downloaded csv dont always add up exactly to the buys). These may be detected and corrected automatically.
cgtcalculator.com may display an error:
**** ERROR in trades data(283) There are more SELLS than BUYS for stock SOFI OR your dates are incorrect (make sure at some time you havent sold more than you own) for stock SOFI
An easy way to fix this is to very slightly increase the number of the shares bought. e.g. increase 4.53212 shares bought to 4.53213 shares bought or very slightly decrease the number sold within the cgtcalculator.com edit box. T212_convert version 4+ and ii_convert_v3 may automatically fix these small discrepancies for you.
Tip: Saving as .csv file
When saving in Excel as a .csv, only use the first .csv option - do not use the MS-DOS or Macintosh options for a .csv file or you will get strange characters in the .csv file...
The xxx_warnings_CVT.csv output files contains lines which cannot be handled by the conversion program - e.g. stock split notifications.Example of a stock split anomaly (in the .txt output file)
S 18/06/2024 CNQ 3.304056 26.4765 0.00 0.00
This will cause an error to be detected by cgtcalculator.com as I seemingly only bought 1.65 shares but sold 3.30 shares! This was because there was a x2 stock split after June 10th.
We need to re-calculate the buy price by dividing the original buy price by 2 (55.9555/2) and then doubling the quantity...
B 10/06/2024 CNQ 3.304056 27.97775 0.00 0.00
S 18/06/2024 CNQ 3.304056 26.4765 0.00 0.00
The output .txt file (or the data in the cgtcalculator.com data field box) must be manually edited. It is now more obvious to the calculator that I managed to make a loss in just 8 days ;-(
Or I could simply work out the loss/gain manually and delete the two rows from the .csv file.
Multiple GIA accounts?
If you have more than one General Investment Account, then you should combine all orders into one single .csv or .txt file before using with cgtcalculator.com. e.g. You may hold BP shares in both Trading 212 and Interactive Investor accounts. Because you may have bought say BP on Trading 212 but sold some BP two days later on say Interactive Investor. According to the 30-day rule, that sale is not counted for tax purposes.
If you always held different shares in different GIAs at any one time, then there is no need to combine all orders into one .csv file.
Other converters
The cgtcalculator.com site has some converters but not one for Trading 212 AFAIK.
The ii one has a bug when dealing with $USD shares however. You can use my ii_convert program instead.
Excess Reportable Income (ERI)
New online calculator tool - UK Tax Calculator!
This tool currently supports the following brokers:
- Interactive Brokers (IBKR) - Activity Statement CSV exports
- Charles Schwab - Transaction History CSV exports
- Trading 212 - Transaction CSV exports (Invest/GIA accounts only)
- Vanguard UK - Transaction History XLSX exports
Tip: If using this program - be careful not to change the date format if you load the .csv file into Excel and re-save it - e.g. for T212 you must keep the custom date format of yyyy-mm-dd hh:mm:ss for the date column in the .csv file.
No comments:
Post a Comment