Capital Gains Tax on Stocks: A Beginner’s Guide

5–8 minutes
Capital Gains Tax on Stocks: A Beginner’s Guide

You sold some stocks for a profit. Congratulations. But now you may owe taxes on that gain.

Many new investors are surprised when tax season arrives. They did not know that selling investments triggers a taxable event – even if you reinvest the money immediately.

This guide explains how capital gains tax works, the difference between short‑term and long‑term rates, and legal ways to reduce what you pay.

What You Will Learn

  • What a capital gain is (and what is not a gain)
  • Short‑term vs. long‑term capital gains tax rates
  • How to calculate your gain or loss
  • The wash sale rule (and why you need to know it)
  • Strategies to minimise capital gains tax

Who is this guide for?

This guide explains US capital gains tax rules. If you are an investor in Singapore or Malaysia, tax rules are different. Browse our guides from main menu for local information.


What Is a Capital Gain?

A capital gain is the profit you make when you sell an asset for more than you paid for it. For stocks, that means selling price minus purchase price (including commissions).

TermMeaning
Capital gainSelling price > purchase price → profit
Capital lossSelling price < purchase price → loss
Realised gain/lossOccurs only when you sell. Unrealised gains (paper profits) are not taxed.

You do not pay tax on unrealised gains. Only when you sell.


Short‑Term vs. Long‑Term Capital Gains

The tax rate depends on how long you held the asset before selling.

Holding PeriodTax RateNotes
Short‑term (1 year or less)Taxed as ordinary income (same as your wage tax rate: 10% to 37%)Higher rates for higher earners.
Long‑term (more than 1 year)Preferential rates: 0%, 15%, or 20% (most people pay 15%)Much lower than ordinary rates for most taxpayers.

Example:

You buy stock for $5,000. You sell it for $7,000.

  • If you held for 11 months (short‑term) and your ordinary tax rate is 22%, you owe $2,000×0.22=440.
  • If you held for 13 months (long‑term) and your long‑term rate is 15%, you owe $2,000×0.15=300.

Waiting just two extra months saved you $140.

According to the Internal Revenue Service (IRS) , the preferential long‑term rates are designed to encourage long‑term investing source: IRS Topic No. 409 Capital Gains and Losses.


2025 Long‑Term Capital Gains Tax Brackets

Your long‑term rate depends on your total taxable income (including the gain).

Filing Status0% Rate15% Rate20% Rate
SingleUp to $47,025$47,026–518,900Over $518,900
Married filing jointlyUp to $94,050$94,051–583,750Over $583,750
Head of householdUp to $63,000$63,001–551,350Over $551,350

Most individual investors fall into the 15% long‑term bracket. High‑income earners pay 20%.

Short‑term gains are added to your ordinary income and taxed at your marginal rate (10%, 12%, 22%, 24%, 32%, 35%, or 37%).


How to Calculate Your Gain or Loss

Formula: Gain = Selling price – Cost basis – Fees

Cost basis typically includes the purchase price plus any commissions or fees.

Example:

  • Buy 10 shares at $100 each = $1,000 cost basis
  • Pay 10 commission = $1,010 total cost basis
  • Sell 10 shares at $150 each = $1,500
  • Pay 10 commission = $1,490 net proceeds
  • Gain = $1,490 – $1,010 = $480 taxable gain

Your broker will report this on Form 1099‑B at the end of the year.


What About Capital Losses?

If you sell an investment for less than you paid, you have a capital loss. Losses can offset gains.

RuleExplanation
Losses offset gains firstShort‑term losses offset short‑term gains; long‑term losses offset long‑term gains.
Up to $3,000 net loss against ordinary incomeIf your total losses exceed gains, you can deduct up to $3,000 against your wage or other income.
Carry forward unused lossesLosses beyond $3,000 carry forward to future years indefinitely.

Tax‑loss harvesting – selling losing positions to offset gains – is a legitimate strategy used by many investors.


The Wash Sale Rule (Important)

The wash sale rule prevents you from claiming a loss if you buy the same or a substantially identical security within 30 days before or after the sale.

Wash sale triggerDays
Before sale30 days
After sale30 days
Total window61 days (30 before + day of sale + 30 after)

Example:

  • You sell a stock at a $1,000 loss.
  • You buy the same stock back 10 days later.
  • The wash sale rule disallows the $1,000 loss. Your cost basis is adjusted instead.

You cannot claim the loss on your taxes. Wait at least 31 days before repurchasing the same or a substantially identical security.

The IRS defines “substantially identical” broadly. For most individual stocks, the same ticker is clearly covered. For ETFs, buying a different ETF that tracks the same index (e.g., VOO vs. SPY) may also trigger the rule – ask a tax professional.

According to the IRS, the wash sale rule applies to stocks, bonds, mutual funds, and ETFs source: IRS Publication 550.


Strategies to Minimise Capital Gains Tax

StrategyHow It Works
Hold for more than one yearQualify for lower long‑term rates.
Use tax‑advantaged accountsIRA, 401(k), Roth IRA – no capital gains tax on trades inside these accounts.
Harvest lossesSell losing positions to offset gains.
Donate appreciated stockDonate shares directly to charity – you avoid capital gains tax and deduct the full market value.
Gift appreciated stock to family members in lower tax bracketsThey may pay 0% long‑term rate if their income is low.
Time your salesSell in a year when your income is lower (e.g., sabbatical, early retirement).

For most long‑term investors, the simplest and most powerful strategy is buy and hold. Do not trade frequently. Let your gains grow tax‑deferred until you need the money.


Common Mistakes to Avoid

MistakeWhy It HurtsFix
Selling too soonShort‑term rates are higher.If possible, wait until the one‑year mark.
Forgetting about state taxesMany states also tax capital gains (some at high rates).Check your state’s rules.
Triggering the wash sale rule accidentallyYou cannot claim the loss.Keep a trading log. Wait 31 days to repurchase.
Not keeping cost basis recordsYou may overpay tax if you cannot prove your purchase price.Your broker tracks it, but download statements annually as backup.

My Take (Finance Mojito Style)

I am not a US taxpayer, so I do not personally pay US capital gains tax. But I could help friends and readers understand how it works – because many of you are US investors.

What I have learned from studying the rules is simple: holding investments for more than one year makes a huge difference. The difference between short‑term rates (as high as 37%) and long‑term rates (0%, 15%, or 20%) can save you thousands.

If you are a US investor, do not let tax worries stop you from investing. Just be intentional: hold for over a year when possible, use tax‑advantaged accounts like IRAs and 401(k)s, and harvest losses to offset gains.

The goal is not to avoid taxes completely. It is to keep more of your returns by playing by the rules.

Here is to your financial clarity. One sip at a time. 🍸


Your 30‑Day Action Plan

WeekAction
1Review your brokerage account. Identify any positions you have held for less than one year.
2If a position has a large gain and is close to the one‑year mark, consider waiting to sell until after the anniversary date.
3Look for losing positions you could sell to offset gains (tax‑loss harvesting). Be mindful of the wash sale rule.
4Download your 1099‑B forms from last year to see how capital gains were reported. Familiarise yourself with the format.

Related Guides


Before You Go

Capital gains tax is not a reason to avoid investing. It is just a cost of successful investing. Plan for it, use the strategies above, and keep most of what you earn.

Next up: How to Invest in S&P 500 Index Funds (VOO, SPY) – A Beginner’s Guide

Siljack Wong


Discover more from Finance Mojito

Subscribe to get the latest posts sent to your email.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top