What Is a Capital Gain?
A capital gain is the profit from selling a capital asset, such as a stock, ETF, bond, or real estate, for more than its cost basis, which is generally what you paid including commissions. Buy 100 shares at $50 and sell at $70, and you have realized a $2,000 capital gain; sell at $40 instead and you have a $1,000 capital loss.
The key distinction is realized versus unrealized. A position that has appreciated but has not been sold carries an unrealized gain, sometimes called a paper gain, and no tax is owed until you actually sell.
Short-Term vs. Long-Term Tax Treatment
Holding period determines the tax rate. Assets held one year or less generate short-term gains taxed at ordinary income rates, which can approach 37% federally for high earners, while assets held longer than a year qualify for long-term rates of 0%, 15%, or 20% depending on income.
For a banker in a 35% bracket, waiting to cross the one-year mark on a $10,000 gain can cut the federal tax from $3,500 to $1,500 or $2,000. High earners also owe a 3.8% net investment income tax on top, so the effective long-term rate is often 18.8% or 23.8%.
Managing Gains as a Young Investor
Capital losses offset capital gains dollar for dollar, and up to $3,000 of excess losses can offset ordinary income each year, with the remainder carried forward. Tax-loss harvesting, selling losers to bank losses while staying invested in a similar but not substantially identical fund, is a standard year-end move; beware the wash-sale rule, which disallows the loss if you rebuy the same security within 30 days.
Vested RSUs deserve special attention: their value at vest is taxed as ordinary income, and only appreciation after the vest date is a capital gain measured from that new basis. Selling shortly after vesting therefore usually triggers little additional capital gains tax.
Sheltering Gains Entirely
Inside a 401(k), IRA, or Roth IRA, buying and selling triggers no capital gains tax at all, which is why active rebalancing belongs in retirement accounts rather than a taxable brokerage. In a Roth, the gains ultimately escape tax entirely.
In taxable accounts, the cheapest strategy is often the simplest: buy broad index funds and hold, deferring the tax bill for decades while the position compounds. Deferral is itself a return enhancer, since money that would have gone to taxes stays invested.
