capital gains calculator
capital gains calculator

Hows it calculated?

This calculator implements the HMRC's share matching rules. To summarise you are treated as having disposed of shares or units in the following order;

Firstly, any you acquired on the date of disposal (see below)

Then any you acquired within 30 days immediately following the date of the disposal

Then for share sales from 5th April 2008 onwards previous unmatched buy trades are pooled, effectivley merged into a single holding called a section 104 holding.

For share sales before 5th April 2008 the following order applies;

Any shares acquired after 5 April 1998, taking the most recent acquisitions first

Then any shares acquired between 6 April 1982 and 5 April 1998. These are pooled.

Then any shares acquired between 6 April 1965 and 5 April 1982. These are pooled.

Then any shares acquired before 6 April 1965. These are pooled.


Same Day Trades    
Trades in the same share in the same day are a special case and are initially pooled so as to avoid ambiguity in the matching order. Basically all buys for a specific stock in the same day are composited into a single trade. Similarly for sells. The composited sell trade, if there is one, is then matched up with the buy trade and an associated gain or loss calculated. A residual trade may remain, either a buy or a sell, if the number of shares bought is different from the number of shares sold. This residual trade is then processed in the main matching phase described above. For more detail read this thread. Consider the following example trades;

B 10/02/2005 BPRG 10000 1.24 10.00 62.00

S 10/02/2005 BPRG 5000 1.25 10.00 0.00

B 10/02/2005 BPRG 5000 1.23 10.00 30.75

S 10/02/2005 BPRG 2000 1.30 10.00 0.00

S 10/02/2005 BPRG 2000 1.35 10.00 0.00

These are same day trades. The initial step is to reduce them to single composited buy and sell trades (the numbers in brackets denote the number of trades composited);

B 10/02/2005 BPRG 15000(2) 1.2367 20.00 25.00

S 10/02/2005 BPRG 9000(3) 1.283 30.00 0.00

Now the sell matches up with the buy giving a net gain of:

(9000 * 1.283 - 30.00) - ((15000 * 1.2367 + 20.00 + 25.00) * (9000/15000) ) = £359.70

A residual trade remains (denoted by "(R)" in the output information);

B 10/02/2005 BPRG 6000 1.2367 8 10

This trade is matched up in the main pass of the algorithm described in steps 2 to 6 above.

Taper Relief    return to top
Taper relief is only applicable to sells made before 5th April 2008. Taper relief has the effect of reducing gains, the amount dependent on how many complete years after 5th April 1998 the shares have been held. The rate of taper relief is more favourable for "business assets" which include most AIM stocks, OFEX and unquoted shares. A table of taper relief rates can be viewed here (note: the rates are generally slightly different for different tax years)

The procedure for applying taper relief isn't all that intuitive. Firstly calculate the total gain (or loss) for the tax year by subtracting total losses from total gains. If you have a gain, and it is above the capital gains threshold, then use any previous losses you may have booked from previous years to reduce your gain as far as possible to the same level as the threshold. If you are still above the threshold then apply taper relief by applying losses to individual gains. At this stage losses should be offset firstly against those gains with the lowest taper relief. This has the effect of maximizing the effects of taper relief and reducing the chargeable gain by the maximum amount.  Note that taper relief may also be split for a single gain when a stock changes status from, for example, full listing to AIM during the period of ownership. In this case taper relief should be applied pro-rata depending on the length of time the stock is a business asset and the time it is a non-business asset. For more detail read this thread . As a brief example say for the 04-05 tax year there are 5 sells realising;

1) Gain = £4,000. Taper relief = 50%

2) Gain = £5,000. Taper relief = 50%

3) Gain = £3,000. Taper relief = 75%

4) Gain = £3,000. Taper relief = 0%

5) Loss = £5,000

CGT exemption for 04-05 = £8,200. There are no previous losses to offset.

Chargeable gain before taper relief = £10,000 - £8,200 = £1,800

If we apply taper relief by first offsetting gains with lowest taper relief first then;

£3,000 of losses is set against 4)

£2,000 of losses is set against 2)

We are left with gains of;

4,000 @ 50% taper relief = £2,000

£3,000 @ 50% taper relief = £1,500

£3,000 @ 75% taper relief = £750

Total gain = £4,250 which is less than the CGT exemption and therefore no tax is payable

Indexation Allowance    return to top
Indexation is an allowance which adjusts gains for the effects of inflation. It only applies to share sales made before 5th April 2008. It runs from the month the shares were acquired, to the earlier of the month when the shares are disposed of or April 1998. Shares acquired on or after 1 April 1998 do not qualify for indexation allowance. Indexation has the effect of increasing the acquisition cost and thereby reducing the gain. Like taper relief it cannot turn a gain into a loss. A table of indexation values and an example can be viewed here. Consider 1,000 shares bought in a company on May 1986 for £1.00 and sold in 1999 for £5.00. The indexation value for May 1986 is 0.662. Ignoring acquisition costs and stamp duty for simplicity;

Gain = Proceeds - ( Cost + ( Cost * Indexation Allowance ) )

= £5,000 - ( £1000 + ( £1000 * 0.662 ) ) = £3328

Calculations    return to top
The total cost of acquiring shares is taken to be:

X = (Number of Shares * Price) + StampDuty +Fees

The amount realised on selling share is taken to be

Y = (Number of Shares * Price) - Fees

The net gain/loss is therefore equal to Y-X

When a quantity of shares are sold that aren't matched against an equal quantity in a buy trade then a percentage is used to calculate costs eg.

2000 shares of AAA are purchased at £0.50. The fees are £10 and stamp-duty is £5. If 1000 shares of AAA are sold at a later date at £1 with fees of £10 then;

Gain = ((1000*1) - 10) - ((2000 * 0.5) + 10 + 5) * (1000 / 2000)= £482.50