Best Value All-in-One Financial Planning Bundle
✓ Financial Planning✓ Net Worth Tracker✓ Monthly Budgeting✓ Travel Budget Planner✓ Annual Budgeting Planner✓ Monthly Expense Tracker✓ Annual Tax Planner✓ Retirement Planning
View Bundle →
Free Download - Excel & Google Sheets

Free Capital Gains Calculator Spreadsheet Template

Calculate capital gains and losses from investment sales. Track tax lots with purchase and sale details for tax reporting.

Download Excel File Works in Excel and Google Sheets · CC BY 4.0
Capital Gains Calculator preview

What's Included

  • Dashboard with gains and losses summary showing total short-term gains, long-term gains, and net capital gain
  • Tax lot tracking with purchase date, purchase price, sale date, sale price, shares, and automatic gain or loss
  • Short-term vs. long-term classification based on holding period with automatic categorization per tax lot sold
  • Automatic gain and loss calculations per lot factoring in cost basis, proceeds, and any commission or fee adjustments
  • Net capital gain summary with color-coded input cells (yellow) and auto-calculated tax lot results (blue)
  • Works in Microsoft Excel, Google Sheets, and LibreOffice Calc with no setup required

How to Use This Capital Gains Calculator Template

1

Enter each sale

For every investment sold, enter the purchase date, purchase price, sale date, sale price, and number of shares.

2

Review holding period

The template classifies each sale as short-term (held under one year) or long-term (held one year or more) automatically.

3

Check gain or loss

Each tax lot shows the calculated gain or loss based on proceeds minus cost basis, adjusted for any commissions.

4

See the summary

The dashboard totals short-term gains, long-term gains, and net capital gain for the tax year.

Built by Claude AI. Perfected by us.

We use Claude AI to draft each free template, after a deep research. Then our team steps in. We refine the layout, stress-test every formula, fix edge cases, and polish the design until it feels like something we would actually use ourselves. The AI gets us 80% there. The last 20% is all human judgment.

Download Excel File Works in Excel and Google Sheets · CC BY 4.0

Frequently Asked Questions

What is a tax lot?

A tax lot is a record of a specific purchase - the date, price, and shares bought. When you sell, matching the sale to a tax lot determines the gain or loss.

Why does holding period matter?

Short-term gains (under one year) are typically taxed at ordinary income rates. Long-term gains (over one year) may qualify for lower capital gains tax rates.

Can I include commission costs?

Yes. Add commissions to the cost basis or subtract them from proceeds. This reduces the taxable gain or increases the deductible loss.

Does it handle wash sales?

The template does not automatically detect wash sales. If a wash sale applies, manually adjust the cost basis of the replacement shares.

How do I open this in Google Sheets?

Upload the .xlsx file to Google Drive, then open it with Google Sheets. All formulas and formatting will be preserved.

What license is this template under?

All free templates are released under CC BY 4.0 (Creative Commons Attribution). You can use, modify, and share them freely - including for commercial purposes - as long as you credit FinancialAha.com. They are provided as-is and do not constitute financial advice.

More Free Investing & Trading Templates

Looking for premium spreadsheet templates?

Our paid templates include advanced multi-sheet dashboards, native Excel charts, and ongoing updates.

Private & secure

Your financial data stays on your device. We never see it.

Learn more →

Need help?

Check our guides or reach out with questions.

View FAQ →