Let’s face it – nobody gets excited about paying taxes on their investments. But if you’ve sold some shares and made a profit, Uncle Sam wants his cut. I’m gonna break down exactly how to calculate capital gains tax on your stock sales without all the confusing jargon.
The Basics: What Even Is a Capital Gain?
Before we dive into calculations, let’s get clear on what we’re talking about.
A capital gain happens when you sell shares for more than you paid for them. It’s that simple. You buy a stock for $1,000 and sell it later for $1,500? You’ve got a $500 capital gain.
On the flip side, if you sell shares for less than you paid (we’ve all been there), you have a capital loss. The good news is losses can offset gains and potentially lower your tax bill.
4 Steps to Calculate Your Capital Gains Tax
Here’s the straightforward process to figure out what you owe
-
Determine your basis – This is what you paid for the shares, plus any commissions or fees. If you reinvested dividends, those get added to your basis too.
-
Calculate your net proceeds – This is how much you received from the sale after any commissions or fees.
-
Subtract your basis from your net proceeds – This gives you your capital gain (or loss).
-
Apply the appropriate tax rate – This depends on how long you held the shares and your income level.
Let’s look at a simple example:
You bought 100 shares of TechCorp for $50 each ($5,000 total) plus a $20 commission. Your basis is $5020.
Two years later, you sell all 100 shares for $70 each ($7,000 total) minus a $20 commission. Your net proceeds are $6,980.
Your capital gain is $6,980 – $5,020 = $1,960.
Short-Term vs. Long-Term Capital Gains: It Makes a BIG Difference!
The length of time you owned your shares before selling them can dramatically impact your tax bill. This is probably the most important thing to understand.
Short-Term Capital Gains (Held 1 Year or Less)
If you held your shares for a year or less before selling, any profit is considered a short-term capital gain. These are taxed at your ordinary income tax rate, which can be as high as 37% depending on your income bracket. Ouch!
Long-Term Capital Gains (Held More Than 1 Year)
Here’s where patience pays off. If you held your shares for more than a year before selling, you qualify for lower long-term capital gains rates:
2025 Long-Term Capital Gains Tax Rates:
| Filing Status | 0% Rate | 15% Rate | 20% Rate |
|---|---|---|---|
| Single | Up to $48,350 | $48,351 to $533,400 | $533,401+ |
| Married Filing Jointly | Up to $96,700 | $96,701 to $600,050 | $600,051+ |
| Married Filing Separately | Up to $48,350 | $48,351 to $300,000 | $300,001+ |
| Head of Household | Up to $64,750 | $64,751 to $566,700 | $566,701+ |
These rates are MUCH better than short-term rates for most investors. For example, if you’re single with a taxable income of $100,000, your ordinary income tax rate might be 24%, but your long-term capital gains would only be taxed at 15%.
A Real-World Example
Let’s say you’re single with a taxable income of $75,000 in 2025.
Scenario 1: You bought shares for $10,000 and sold them six months later for $15,000.
- Capital gain: $5,000
- This is short-term, so it’s taxed at your ordinary income rate (probably 22%)
- Tax owed: $1,100
Scenario 2: You bought shares for $10,000 and sold them 13 months later for $15,000.
- Capital gain: $5,000
- This is long-term, so it’s taxed at 15% (based on your income)
- Tax owed: $750
That’s a $350 difference just for holding your shares a few months longer!
What About State Capital Gains Taxes?
The fed ain’t the only one with their hand out. Most states also tax capital gains, typically at the same rate as ordinary income in that state.
However, there are currently eight states with no capital gains taxes: Alaska, Florida, Nevada, New Hampshire, South Dakota, Tennessee, Texas, and Wyoming.
If you live in a high-tax state like California, New York, or Minnesota, your total capital gains tax rate (federal + state) could be significantly higher than the federal rate alone.
The Net Investment Income Tax: An Extra 3.8% for High Earners
If your modified adjusted gross income (MAGI) is above certain thresholds, you might also owe an additional 3.8% Net Investment Income Tax:
- Single or Head of Household: $200,000
- Married Filing Jointly: $250,000
- Married Filing Separately: $125,000
This tax applies to the lesser of your net investment income or the amount by which your MAGI exceeds these thresholds.
5 Smart Ways to Minimize Your Capital Gains Taxes
We all want to legally pay less in taxes. Here are some strategies that could help:
-
Hold investments longer than one year – This simple strategy can dramatically reduce your tax rate.
-
Use tax-advantaged accounts – Investments in 401(k)s, IRAs and Roth IRAs can grow without capital gains tax implications.
-
Harvest tax losses – If you have investments that have declined in value, consider selling them to offset gains from other investments. You can deduct up to $3,000 in net capital losses against your ordinary income each year.
-
Time your sales strategically – If you’re close to qualifying for a lower tax bracket or long-term status, consider waiting to sell.
-
Consider gifting appreciated shares – If you’re charitably inclined, donating appreciated shares directly to qualified charities can help you avoid capital gains taxes.
How to Report Capital Gains on Your Tax Return
When it’s tax time, you’ll need these forms:
- Form 8949 – Lists all your individual stock transactions
- Schedule D – Summarizes your capital gains and losses
- Form 1040 – Where you transfer the info from Schedule D (line 7)
Your broker will send you Form 1099-B showing your stock sales for the year, which makes filling out these forms easier. Many brokers now report your cost basis to the IRS as well.
Special Situations to Be Aware Of
There are some special circumstances that might affect your capital gains calculations:
Inherited Stocks
If you inherit stocks, you get what’s called a “stepped-up basis.” This means your cost basis is the fair market value of the stocks on the date the original owner died, not what they originally paid. This can significantly reduce your capital gains tax when you sell.
Stocks Received as Gifts
For gifted stocks, your basis is usually the original owner’s basis. However, if the stock’s fair market value was lower than the original owner’s basis when you received it, and you end up selling it at a loss, your basis for calculating the loss is that lower fair market value.
Employee Stock Options
These can have complex tax implications depending on whether they’re qualified (ISOs) or non-qualified (NQSOs). Consult with a tax professional if you have these.
Bottom Line: Plan Ahead to Minimize Your Tax Bill
Understanding how capital gains taxes work can help you make smarter decisions about when to buy and sell your investments. Generally speaking:
- Hold investments for more than a year when possible
- Consider tax implications before selling, not after
- Keep good records of all your investment purchases and sales
- Use tax-advantaged accounts for investments when appropriate
- Consider working with a tax professional if your situation is complex
Remember, while nobody likes paying taxes, they’re a sign you’ve made money on your investments – and that’s not a bad thing!

Special rules and exclusions
Rules around capital gains taxes vary depending on the type of asset, the length of time it was held, and your tax bracket. These are some general exceptions and exclusions to know.
Holding investments for over a year
Investments held for longer than a year are subject to lower capital gains tax rates compared to those held for less than a year.
Capital Gains Taxes Explained: Short-Term Capital Gains vs. Long-Term Capital Gains
FAQ
How do you calculate capital gains on shares?
To calculate capital gains, subtract the cost of acquisition and sale expenditures from the sale price. If capital gains exceed Rs. 1.25 lakh in a fiscal year, apply a 12.5% tax rate (plus surcharge and cess) on the excess profits.
How much capital gains tax will I pay if I sell stock?
Generally, any profit you make on the sale of an asset is taxable at either 0%, 15% or 20% if you held the shares for more than a year, or at your ordinary tax rate if you held the shares for a year or less. Any dividends you receive from a stock are also usually taxable.
How much capital gains tax will I pay when selling shares?
The main rate of CGT is 18% for basic rate taxpayers. For higher or additional rate taxpayers, the rate is 24%. If you are normally a basic-rate taxpayer but when you add the gain to your taxable income you are pushed into the higher-rate band, then you will pay some CGT at both rates.
How much capital gains tax do you have to pay on shares?
The amount of CGT you will pay on your shares can vary depending on how long you have held the investment. If you own the asset for less than 12 months, you will have to pay 100% of the capital gain at your income tax rate. If you own the asset for longer than 12 months, you will pay 50% of the capital gain.