DI
dickreuter/cgt-share-matching-web
Uk Capital gains tax calculator with share matching algorithm
Capital Gains Tax Calculator
Visit www.cgt-share-matching.co.uk
Welcome to the automatic Capital Gains Tax Calculator. This tool helps you calculate the capital gains taxes on your share dealings based on UK tax rules. Simply upload a CSV file with your transaction details, and the calculator will apply the appropriate tax rules to compute your gains or losses.
CSV File Format
Your CSV file must contain the following columns:
- TradeNumber: A unique identifier for each trade.
- Date: The date of the transaction (format: YYYY-MM-DD).
- Ticker: Ticker or unique name of the security.
- Shares: Number of shares traded. For sales, the number has to be negative.
- Price: Price per share.
- Costs: Associated costs (e.g., broker fees).
Example::
TradeNumber,Date,Ticker,Shares,Price,Costs
1,2024-01-01,msft,100,10.0,1.0
2,2024-01-02,msft,-50,12.0,0.0
...
Applied Rules
This calculator applies the following rules:
- Same-Day Rule: Matches sales with purchases made on the same day.
- Bed and Breakfasting Rule: Matches sales with re-purchases within 30 days after the sale.
- Section 104 Holding: For sales not matched by the above rules, uses the average cost of shares in the pool.
On this page
Languages
TypeScript70.2%CSS20.6%HTML6.2%JavaScript3.0%
Contributors
Created January 27, 2024
Updated November 14, 2025