This article has been updated for the 2022 and 2023 tax years. Capital gains tax rules do not make for a particularly thrilling topic. But, seeing that this is a personal finance blog geared towards young professionals and we should all be investing as early as possible, capital gains (and losses) related to investing are something I wanted to do a 101 type overview of. And what better time than now, as we head in to end of year tax planning and then tax filing season?
If you buy and sell investments, you need to know capital gains tax rate basics or you are at risk of significant losses through bad tax planning, an IRS audit if you calculate things incorrectly, or worse. You need to be particularly careful with capital gains when selling stock units from your employer.
This won’t be a complete guide to capital gains taxes, but hopefully it will provide a base background on the primary things that should be top of mind when it comes to investing assets and tax implications when you sell those assets, so that you can do further research when necessary or be more informed on questions you take to a tax professional or the IRS.
Capital Gains Start with Cost Basis
When you purchase an investment asset (e.g. a stock unit that has fully vested or stock in a taxable investment account), what you pay for that investment is your cost basis. So if you buy 1,000 shares of stock “Doofus & Sons Inc.” at $10 per share, your cost basis for those shares totals $10,000.
Note: you can also factor in the cost of the sale transaction in to your cost basis (i.e. $10 commission would add $10 to your cost basis).
The cost basis is what you use to calculate whether you have a capital gain or capital loss when you sell your asset, and how much those capital gains or capital losses are.
Capital Gain Vs. Capital Loss Definition
When you sell a capital asset, you either have a:
- capital gain: when the price at which you sell is more than the price at which you purchased the asset
- capital loss: when the price at which you sell is less than the price at which you purchased the asset
Calculating capital gains and losses is fairly simple, if you don’t purchase and sell often.
For example, let’s say your 1,000 shares of Doofus & Sons appreciated to $15 (up from $10) per share. Your total proceeds from selling would equal $15,000. Your cost basis was $10,000. So your capital gains would be $5,000 ($15,000 proceeds minus $10,000 cost basis).
If, on the other hand, your Doofus & Sons shares declined to $5 (down from $10) per share, you would be left with only $5,000 if you sold the shares. Since your cost basis was $10,000, you would realize a capital loss of $5,000 ($5,000 proceeds minus $10,000 cost basis).
Cost Basis Methods & Reporting
If you do purchase shares often, the math isn’t quite so simple. It used to be that you had to calculate the gains/losses on your own. However, recent legislation now (thankfully) requires brokers to do the calculations for stocks purchased in 2011 or later, and mutual funds and most ETFs purchased in 2012 or later and provide them to you through a 1099B form.
There are a number of different ways that cost basis can be calculated when you have a large number of shares. I won’t go in to all of the details here (the Bogleheads wiki covers it well), but the industry standard default for stocks and mutual funds typically are:
- Stocks: first in, first out (FIFO) – in this method, the first shares purchased are assumed to be the first shares sold.
- Mutual funds: average cost – in this method, you calculate the average cost of all shares that were purchased that are being sold, and use that as the basis.
Short-Term Vs. Long-Term Capital Gains & Losses
Next, there are two types of capital gains or losses:
- Short-term: capital gains or losses are considered “short-term” if the asset was held for less than a year.
- Long-term: capital gains or losses are considered to be “long-term” if the asset was held for more than a year.
The difference between the two is significant when it comes to capital gains. What you ultimately pay in taxes on gains will be influenced by how long you held the asset.
Short-term capital gains are taxed at your ordinary income rate. Long-term capital gains, on the other hand, get preferential tax treatment at levels that are below ordinary tax rates.
An important takeaway is that if you are considering selling an investment that has increased in value, it might make sense to continue holding it until at least the 1-year mark for the capital gain to be considered long term (when your taxes could potentially be lower, depending on what bracket you are in). Consider this as something for you to be aware of and look in to. More on this in a bit.
Capital Gains, Losses, & Taxes
If you have both capital gains and capital losses in the same calendar year, the losses cancel out the gains when calculating taxable capital gains.
For example, if you have $5,000 in capital gains and $3,000 in capital losses, you would only pay taxes on the $2,000 in capital gains you netted.
If your capital losses were greater than your capital gains in the same calendar year, you would actually be able to deduct your capital losses, up to $3,000 per year ($1,500 for a married individual filing separately).
Capital losses exceeding $3,000 can also be carried over into the following year and subtracted from gains for that year (or deducted if left with a net negative). This is called a “capital loss carryover“.
Can you Carry a Capital Loss Carryover Beyond 1 Year?
Many people think that you can only carry over a capital loss for 1 year. That is not true. You can continue carrying over the capital loss until it is 100% used up or if you make gains in the subsequent years the remaining losses can cancel out the gains.
For example, if you have a capital loss of $21,000 in one year, you could take a deduction of $3,000 in that year and $3,000 each of the next six years (for a total of $21,000 in deductions). If you had a gain of $10,000 in year 2, you would subtract $10,000 in capital losses, and then carry over the remaining capital loss balance to year 3 and future years until it was depleted. If you had an additional new loss in year 2, you simply add that loss to year 1, and carry both over to year 3.
Netting Out Capital Gains & Losses (Short-Term Vs. Long-Term)
What happens when you have a net gain in the short term category and a net loss in the long term category, or vice versa? You net the two against each other, and the remaining gain or loss is taxed according to its character (short term or long term).
Capital Gains Tax Rates:
The below charts show the large difference between how short and long term capital gains are taxed at each tax bracket – with taxable income calculated by subtracting the greater of the standard or itemized deductions from your adjusted gross income:
2022 Short-Term Capital Gains:
2022 Long-Term Capital Gains:
2023 Short-Term Capital Gains:
2023 Long-Term Capital Gains:
Capital Gain Tax Forms
Brokerages are now required to send you capital gain and loss reporting via a 1099B form, so that you do not have to calculate everything on your own.
From there, your capital gains and losses will be calculated on IRS Form 8949 and reported on the IRS’s 1040, Schedule D form.
For more info on capital gains tax rules, check out IRS topic 409.
That wasn’t so bad, was it?
Join 10,000+ readers & get new articles by email, for free.
Thanks! Check your inbox (& spam folder) in a minute for your welcome email!
Oops… Please try again.