Capital Gains Tax Article Banner

Capital Gains Tax: How It Works and What You May Owe

Capital gains tax is the tax you may owe when you sell an investment or other capital asset for more than its adjusted cost basis. For a stock held in a taxable brokerage account, your federal tax depends on the size of the gain, how long you held the shares, your taxable income, and whether you have capital losses that can offset the gain.

If you’re selling investments to fund a purchase, reduce a large position in one company, or cover retirement spending, estimate the tax before you sell. The amount you keep after taxes can affect how much you need to sell in the first place.

How to calculate a capital gain

1. Find your adjusted cost basis

For stock you purchased, your basis generally starts with what you paid, including any purchase commissions. It can change after events such as a stock split or a return-of-capital distribution. If you bought the same stock several times, check the basis for the specific shares you plan to sell. Inherited or gifted assets can have different basis rules.

2. Subtract your basis from your net sale proceeds

Start with what you received from the sale and subtract any selling expenses. Then subtract your adjusted basis. Suppose you paid $10,000 for shares and paid a $50 purchase commission. Your basis is $10,050. If you later sell the shares for $15,000 and pay $50 in selling expenses, your net proceeds are $14,950. Your capital gain is $4,900.

 3. Check how long you held the asset

A gain is generally short-term if you held the asset for one year or less and long-term if you held it for more than one year. For shares purchased on different dates, some may qualify for long-term treatment while others are still short-term. Check the acquisition dates before placing the trade, especially if you’re close to the one-year mark.

4. Estimate the tax using your full-year income

Net short-term gains are generally taxed at ordinary federal income tax rates. Most net long-term gains are taxed at 0%, 15%, or 20%, depending on taxable income and filing status. A gain can span more than one rate band. Some assets, including collectibles and certain depreciated real estate, have special rules. Higher-income taxpayers may also owe the 3.8% Net Investment Income Tax, and state taxes may apply.

If the entire $4,900 gain in the example falls within the 15% long-term rate band, it would generate $735 in regular federal capital gains tax before any additional taxes or offsets. For an estimate you can use to plan a sale, account for the rest of your taxable income and other gains or losses for the year.

What to review before selling an investment

  • Compare the timing. If you’re close to qualifying for long-term treatment or expect a significant change in income next year, ask your tax professional to model both sale dates. If you’re selling to reduce an oversized position in one company, weigh the potential tax savings against the risk of continuing to hold the shares.
  • Review available losses. Capital losses can offset capital gains under federal tax rules. If you sell stock or securities at a loss and buy substantially identical stock or securities within 30 days before or after the sale, the wash-sale rule can generally disallow the current loss deduction. Check recent trades and scheduled purchases before counting on the offset.
  • Check which account holds the investment. A sale inside an IRA or 401(k) generally doesn’t create an immediate capital gains tax bill. Withdrawals follow the rules for the account. If you’re raising cash, compare the tax consequences of selling in a taxable account with those of taking a retirement account distribution.

Frequently asked questions

Do I owe capital gains tax if I haven’t sold my stock?

Generally, an increase in your stock’s value is an unrealized gain until you sell or otherwise dispose of the shares. In a taxable account, you can still receive taxable capital gain distributions from a fund even if you haven’t sold any fund shares. (Learn more:

If your capital losses exceed your capital gains, you can generally deduct up to $3,000 of the net loss against other income each year, or $1,500 if you’re married filing separately. Unused losses can generally carry forward to future years. (Learn more:

If you sell your primary residence at a profit, you may qualify to exclude up to $250,000 of the gain, or up to $500,000 if you’re married filing jointly and meet the requirements. Eligibility generally depends on how long you owned and lived in the home and whether you’ve used the exclusion recently. (Learn more: https://www.irs.gov/taxtopics/tc701)

If you’re planning to sell investments or reduce a large position, Good Life Private Wealth can help you evaluate the decision in the context of your portfolio and coordinate with your tax professional. Schedule a consultation today.

Learn more about capital gains tax by visiting the following sources, referenced in this article: