Javascript is not enabled.

Javascript must be enabled to use this site. Please enable Javascript in your browser and try again.

Skip to content
Content starts here
Leaving Website

You are now leaving and going to a website that is not operated by AARP. A different privacy policy and terms of service will apply.

How to Calculate Capital Gains and Losses on Your Tax Return

If you made a killing in real estate, stocks or cryptocurrencies, Uncle Sam wants his share

spinner image Financial advisor explaining paperwork to a man and woman
Getty Images

The S&P 500 stock index, a broad measure of the U.S. stock market and a core holding in many brokerage accounts and 401(k) plans, has risen about 9 percent this year. Many individual stocks, such as chipmaker NVIDIA (+240 percent) and social network Meta (+180 percent) posted even bigger gains. Homeowners saw the equity in their homes spike, with the median price of a home — meaning half were higher and half were lower — jumping 13.9 percent to $394,300 in 2023 through September. 

The upshot? All that asset appreciation means retirees who sold assets with big gains to pay the monthly bills or lock in profits could be looking at a sizable 2023 capital gains bill from the Internal Revenue Service (IRS). Simply put, a capital gain is a tax on the profits (minus your cost basis) you make when you sell a financial asset.

If you made money this year, good for you. But taxes are a big part of the game. It’s not what you make, it’s what you keep. To give you an idea of how big a bite the IRS will take from last year’s investment gains, here’s a primer on 2023 capital gains tax rates for assets ranging from stocks to silver.

Retirement distributions

If you’re 59½ or older and withdrew money from traditional retirement accounts — such as a 401(k) or IRA that is funded with dollars you didn’t pay income tax on — you’ll be taxed at your ordinary income tax rate. So any retirement fund distributions you took in 2023 will be part of your taxable income, no different from a paycheck or interest you earn on a savings account or certificate of deposit. The IRS tax brackets for 2021 (which are based on income ranges) are 10 percent, 12 percent, 22 percent, 24 percent, 32 percent, 35 percent and 37 percent. The income tax system is graduated: Individual taxpayers would pay the top rate only on taxable income greater than $578,125, and married couples filing jointly would pay the top rate on income above $693,750.

spinner image Image Alt Attribute

AARP Membership

Join AARP for $12 for your first year when you sign up for Automatic Renewal. Get instant access to members-only products and hundreds of discounts, a free second membership, and a subscription to AARP The Magazine

Join Now

One thing to watch out for: When you take a large distribution to pay for things such as your grandkids’ college tuition or a down payment on a retirement home, you run the risk of paying more in taxes due to the withdrawal. “You can bump up to a higher tax bracket,” says Daniel Milan, managing partner at Cornerstone Financial Services. That could mean more of your income gets taxed at a higher rate.

Withdrawals from Roth IRAs and Roth 401(k)s aren’t subject to any taxes, since these retirement savings accounts are funded with after-tax dollars. So if you withdrew $100,000 from a Roth IRA to buy a beach house, for example, you’ll owe zero taxes on the distribution.


When you sell a stock for a profit, that profit is subject to capital gains tax. (That assumes that the sale didn’t occur in a tax-protected account such as a 401(k) plan.) And if you made a killing in cryptocurrencies, such as bitcoin, you’re also subject to capital gains tax. The amount of tax you’ll have to fork over will depend on how long you held the asset before selling it and what your taxable income is. Profits on assets held for one year or less are subject to short-term capital gains, which are taxed at ordinary income tax rates ranging from 10 percent to 37 percent.

Profits from selling assets you own for more than a year are long-term capital gains. Those held for more than a year get more favorable tax treatment, and the lower your taxable income, the lower your long-term capital gains rate will be. The IRS says the net capital gains tax for most individuals is no higher than 15 percent. Here are the capital gains tax rates for the 2023 tax year.

  • 0 percent capital gains rate: If your taxable income is less than or equal to $44,625 (single) or $89,250 (married filing jointly), you’ll pay 0 percent in capital gains tax.
  • 15 percent capital gains rate: The 15 percent capital gains tax kicks in for moderate to high earners with taxable income of more than $44,625 but less than or equal to $492,300 for single filers; more than $89,250 but less than or equal to $553,850 for married couples filing jointly; more than $59,750 but less than or equal to $523,050 for head of household; or more than $44,625 but less than or equal to $276,900 for married people filing separately.
  • 20 percent capital gains rate: The higher 20 percent capital gains rate is levied when your taxable income exceeds the thresholds set for the 15 percent capital gains rate.

Here’s a simple example to illustrate the benefit of holding shares longer than a year. Let’s say you’re a married couple with $150,000 in taxable income. Your marginal tax rate is 24 percent, which means that if you sell a stock you’ve owned for less than a year that nets you a $10,000 gain, you’ll pay $2,400 in taxes. In contrast, if you held that same stock for at least a year before selling it, you’d pay $1,500 because you now pay at the lower long-term capital gains tax rate. So your after-tax profit is $900 better by simply holding for more than a year.

“If you hold for one year and one day, you get a completely different tax bill than if you held it for one less day,” says Hayden Adams, director of tax and financial planning for the Schwab Center for Financial Research.

spinner image membership-card-w-shadow-192x134

Get instant access to members-only products and hundreds of discounts, a free second membership, and a subscription to AARP The Magazine.

Capital gains from stock sales are usually shown on Form 1099-B sent to you by your broker, bank or fund company.

Net investment income tax

The tax hit is even bigger on high earners who also have hefty investment income. If your modified adjusted gross income (MAGI) tops $200,000 (single), $250,000 (married filing jointly) or $125,000 (married filing separately), you may also owe a 3.8 percent net investment income tax, or NIIT, on top of capital gains you have to pay. “That often comes as a big surprise to a lot of people,” says Daniel Genter, president, CEO and chief investment officer at RNC Genter Capital Management.

This surtax was put in place in 2013 to help fund the Affordable Care Act. If there’s a silver lining, it’s that the 3.8 percent add-on tax applies only to the lesser of your total net investment income or the portion of your MAGI that goes over the income threshold for your filing status. And it doesn’t apply to gains on the sale of your personal residence.

Real estate

The housing market has stalled a bit in 2023. Still, housing prices have risen steadily since the pandemic began as people seek more space and better locations, pushing the median price of homes well into the seven-figure range in many cities from coast to coast. But many sellers who owned those properties as their principal residence for many years were slapped with sizable capital gains tax bills. The reason: If you’re single, only the first $250,000 in profit is tax-free, and that number rises to $500,000 for married couples who file a joint tax return. “With the type of appreciation we have seen in some markets, those numbers don’t go a long way,” Genter says.

Indeed, when homes are selling for millions of dollars, the net profit on a home sale can far exceed the tax-free exemptions the IRS offers.

“If you’re married and bought a home for $500,000 more than a year ago and you sell it for $1 million, there’s no tax; your $500,000 profit is tax-free,” Milan explains. “But if you sold it for $1.25 million, you’ll have a capital gain of $250,000.” That large gain will then be taxed at the long-term capital gains rate of 15 percent or 20 percent, depending on your overall taxable income.

Second home

Tax savings are harder to come by when you own a second home, such as a vacation home at the beach or ski slopes. The IRS treats second homes as a capital asset; therefore, when you sell, your profits are taxed as a capital gain, just as a stock is. So if you’re not wealthy and you bought a vacation home for $500,000 and sold it two years later for $600,000, you’ll most likely pay a 15 percent long-term capital gains tax on your $100,000 profit. Your tax hit would be $15,000.

Precious metals

If you’ve been trying to offset the ravages of spiking inflation and bought and sold assets such as gold and silver and other precious metals, you’re looking at a 28 percent capital gains tax on gains — not the normal 20 percent top tax rate for stocks. The reason: The IRS treats gold and silver as “collectibles” and slaps a 28 percent capital gains rate on profits. The same 28 percent capital gains rate applies to profits on exchange-traded funds (ETFs) that invest in physical gold and silver as well as art and rare coins.

spinner image membership-card-w-shadow-192x134

Get instant access to members-only products and hundreds of discounts, a free second membership, and a subscription to AARP The Magazine.

Tax-saving tips

What do you do if you want to trim your capital gains tax in 2023? Schwab’s Adams offers some tips: If possible, hold on to assets beyond the one-year threshold, so you can get the more favorable tax treatment of long-term capital gains. Think before you hit the sell button. “It’s really easy to trade today,” he says. “Click, click, click and you’re done. But think before you sell to minimize taxes.”

And, he says, you don’t always have to sell your winners. Selling a stock at a loss can save you in taxes. You can offset any amount of capital gains with losses. If you have more gains than losses, you can deduct up to $3,000 of those losses from your income. And if you have more than $3,000 in capital losses, you can carry over the rest of your losses for future years.

“Take the time to strategize,” Adams says.

Discover AARP Members Only Access

Join AARP to Continue

Already a Member?

spinner image membership-card-w-shadow-192x134

Get instant access to members-only products and hundreds of discounts, a free second membership, and a subscription to AARP The Magazine.