Monday, 20 January 2025

Online calculator for UK Capital Gains Tax using www.cgtcalculator.com (examples for Interactive Investor and Trading 212)

I have a General Investment account with Interactive Investor, but I found it very painful to calculate my UK Capital Gains Tax liability on my Stocks and Shares sales.

Then someone on the ii forum suggested I try www.cgtcalculator.com and it seems to be pretty good. It seems to understand the same day rule, Section 104 rule and the 30-day rule.

If you don't know what the 30-day rule (bed-and-breakfast rule) is, then watch this video (see example 1) and here. Note selling shares of ABC on Trading 212 for instance, but then buying ABC a few days later on Interactive Investor also counts in the 30-day rule (AFAIK)! 

If you have several GIA accounts, you should combine all trades into one table (CSV, XLSX, etc.) first, before calculating gains/losses and CGT.

So here are my simple steps to calculate gains/losses for CGT purposes. I also include a Trading 212 example.

Use a PC/Notebook and the browser.

STEP 1 - Download a CSV

Both Interactive Investor and Trading 212 allow you to download your shares transactions or orders.

In all cases we need to download all the Buys and Sells that were made from the very start of when you opened the account up to 30 days AFTER the last day that you want to include.

For instance, to calculate your CGT for the tax year 2023-2024:

Start date:  Date you made your first trade (across all GIA accounts)
End date:   5 April 2024 + 30 days = approx. 5 May.

Interactive Investor


1. Use the web site (the app does not seem to support downloading of a CSV file!)

2. Login and go to Transaction History and make sure your Trading account is selected.

3. Set the period to 2 Years (this stupidly seems to be the maximum - if you started your GIA account more than 2 years ago, you will have to do several CSV downloads in periods of 2 years by setting Custom dates (really painful!) and then combine the CSVs. You must include all buys and sells of any shares that you sold in the tax year that you want to calculate CGT for. If you know you only sold ACME shares in 2024 and you only bought them in Feb. 2023, then you only need to go back as far as  Feb. 2023. If you have made many purchases of ACME shares over a few years, then you must get a CSV that includes that first purchase.

You only need to include all trades of all shares that you actually sold in the relevant tax year. If you did not sell any ACME shares in the 2024/2025 tax year, then they don't need to be in the spreadsheet when working out 2024/2025 CGT (but it won't hurt if they are).

Trading 212

Trading 212 actually provide a pretty good Tax Certificate document a month or so after the end of each tax year (around May/June I think). I am not sure if it caters for the 30 day rule but I suspect it does. In contrast, the ii tax document just shows interest payments!

Just before the end of the tax year, I like to look at my total gains for the year because I have a £3000 tax free allowance on CG at the moment. I usually like to sell £20K of shares in my GIA and put it into my ISA at the start of the new tax year. This may crystallize a gain of over £3K (and thus tax is payable) and indeed, I may already have sold some shares and made some gains already. I try to take full advantage of the 3K allowance and a bed-and-ISA is perfectly OK to do (i.e. Sell ABC in my GIA and buy ABC in my ISA) with no 30-day window, etc. If my gains are under £3k then I don't need to declare it to HMRC.


1. Trading 212 - History - Orders (and select only the Orders checkbox)

2. Click the download folder/file icon to download a CSV file.


STEP 2 - Excel manipulation

2.1 Delete unwanted columns

1. Load the .CSV file into Excel (or any spreadsheet app) and delete all the columns that we don't need.

 The ones we want to keep are:

  1. Buy/Sell (if present)
  2. Date of Settlement
  3. EPIC/Ticker name of share - e.g. SWDA (if this is not available, you can use the descriptive long name BUT it must not contain any spaces - you can use Excel's 'Find and Replace' to change all spaces to underscores)
  4. Number of shares
  5. Net Amount GBP (the amount you actually paid or received after including all costs and tax and foreign exchange fees, etc.) this must be in £GBP
Tip: To delete rows which are not stock buys/sells, place the cursor on any cell in the row that you want to delete and press SHIFT+SPACE and then press CTRL+MINUS. We are only interested in Buys and Sells so Rows 2,4,5,10,11,14, etc. can be removed.

Interactive Investor with only the required columns.

Trading 212 with unwanted columns removed

2.2 Manipulate/merge columns into one Buy\Sell column

Interactive Investor - add the Buy\Sell column A and combine Debit/Credit columns to make a single NET gain/cost column

Interactive investor has two separate columns (Debit and Credit). We need to combine these two columns into one new column. Use Cut and Paste into one column - then remove the other column.

Then add a new column A for Buy or Sell (S or B) and edit as appropriate.

2.3 Add a 'Net price' column, etc.

Now we need to calculate the net share price by dividing the NET figure (which will have Stamp Duty, broker charges, Fx fees, etc. all costed in) by the number of shares.

Add a new Net price column (E).

We will not use the 'Price' column that is already there because this may be $ or some other currency. It is also not net of charges, etc.  (that is why E2 is so different from I2 - because E2 was actually in $).

e.g. use the formula =H2/D2   in cell E2.


Once E2 has been entered, you can click on the cell and select the small black square at the bottom right of the cell and drag it all the way down to the bottom row of your spreadsheet.



Set the decimal point accuracy to show 4 decimal points to avoid small errors and prices can be set to 'Currency' type.

Now add in the CHARGES and TAX columns and enter 0 for them.

The finished spreadsheet is shown below:

Copy the area inside the red marker.

CGTCALCULATOR.COM

1. Go to www.cgtcalculator.com (free) and log in.
2. Now in Excel, select the area outlined in red shown above, i.e. all the data in the first 7 columns.
Do NOT include the column headings.
3. Hit Ctrl+C to copy it and then paste it into the yellow window of the calculator using Ctrl+V.
4. Click on Format/Sort button and then the CALCULATE button. Hopefully there will be no errors.


The Gain/Loss for each sell is listed as well as a summary.

NOTES

My understanding (which may be incorrect!) is that for 2024-2025 tax year, there are two rates of CGT. One rate (10%/20%) before October 30th 2024 and a higher rate on all sells after October 29th 2024 (18%/24%).

The cgt tool does not allow for this, so you will have to sum up your trades into two tax groups.

I am unsure how to apply the £3k tax allowance (i.e. which group does it apply to?).

Note that Stamp Duty, Fx fees, broker fees, etc. are not split out. The cgtcalculator website seems to imply that they are needed for some reason that I do not understand. I assume because we are using 'net of cost' figures, it gives the same results.

Also, due to the 30-day rule, you must include all trades up to 30 days past the tax year end in your CSV (but only gains in the tax year are put in your tax return - i.e. not the extra 30 days!).

Losses can be counted up to 4 years back, so if you made a loss in previous years, you can deduct that loss from this year's gain before you deduct the CGT tax allowance figure.

30-day rule examples

Example 1

Shares bought within 30 days are deemed to be of the same value.
The SELL did not make a gain.

Example 2

Here is an example showing that although the gain on the first SELL was reduced to zero, the gain on the next sale will be increased:

Effectively we bought at 13.3333 but sold at 25.00!
   
CALCULATION: Gain = £17,500.00 = ( 1500 * 25.00 - 0.00 ) - (1500*13.3333)

Example 3

Another example around the tax year end but selling 1500 and buying back only 1000.


This shows why it is best to include all your transactions from the very start of trading even if you think you sold all your shares previously!

The example below also shows how buying the same shares within 30 days can affect your capital gains calculations.

Example 4

Gain = £9000

Now here are the same trades with the same sell and same previous two buys, but this time we did not make the last buy of ABC shares until over a month later:

Gain = £10000

So if the ABC share price has dropped since selling them for a gain, if you buy them back again within 30 days at a cheaper price, you can reduce your Gains for tax purposes on the previous sell substantially.


__________________

If you think this method is flawed or spot any other issue or mistake, please let me know.

I hope this saves you a great deal of time and please support the creator of the cgtcalculator online tool.

Good Luck!





No comments:

Post a Comment