Investments I Sold Stocks This Year. Do I Pay Tax on the Whole Sale? Read the Article Open Share Drawer Share this: Share on Facebook (Opens in new window) Facebook Share on X (Opens in new window) X Share on LinkedIn (Opens in new window) LinkedIn Share on Pinterest (Opens in new window) Pinterest Print (Opens in new window) Print Written by Dawn Allcot Published Feb 20, 2026 3 min read Reviewed by Karis Fedor, CPA Susan Yeatts, EA Key takeaways You only pay tax on the profits earned from investments sold. Make sure to deduct any commissions and fees from your total profit. Capital gains are taxed at two different rates depending how long you held the investment. Table of Contents Key takeawaysCalculating capital gainsReinvesting dividends – a smart move to save you moneyCalculating cost basis on your gifted or inherited stocksShort vs. long term capital gainsCapital gains tax FAQ I’d been watching certain stocks rise all year and decided it was time to cash out. But I didn’t want a surprise tax bill waiting for me. Your refund is waiting Get started Here’s what many investors don’t realize: You don’t pay capital gains tax on the full sale price. You only pay tax on your profit — what’s left after subtracting what you paid for the investment (including fees). If you sell at a loss, you won’t owe capital gains tax — and you may even be able to use the loss to offset other gains. Calculating capital gains To calculate your profits, you need to know the stock’s cost basis, which is what you paid after fees and commissions. For example, if you purchased stock for $10,000 and paid $50 total in fees, your cost basis is $10,050. If you sell it for $20,000, your taxable gain is $$9,950 — not $20,000. Reinvesting dividends – a smart move to save you money Reinvesting dividends boosts your cost basis. That can lower your capital gains when you sell — which may reduce the amount you owe. Let’s say you buy a stock for $500 and reinvest a 6% dividend. After a year, your total investment grows to $530. If you later sell the stock for $1,500, your taxable gain isn’t $1,000 — it’s: $1,500 – $530 = $970 Calculating cost basis on your gifted or inherited stocks Inheriting stocks or receiving securities as a gift can feel like a windfall. But it’s not entirely free money; you still may owe capital gains tax when you sell. For gifted stock, you typically use the original owner’s cost basis. Inherited stock generally uses the value on the date of death. Short vs. long term capital gains One year or less: Taxed at your ordinary income tax rate (10%–37%). More than one year: Taxed at 0%, 15%, or 20%, depending on your taxable income.Find out exactly what you owe with our free Capital Gains Tax Calculator. Capital gains tax FAQ How do I calculate cost basis when selling stock? Your cost basis includes what you paid for the stock, reinvested dividends, and applicable fees or commissions. To calculate taxable capital gains, subtract the cost basis from the selling price. How do I minimize tax on investment profits? Make sure to report capital gains only on the profits you made, and not on the whole sale price of stock. How do I use a capital gains tax calculator for the sale of stocks? To use a capital gains tax calculator, you’ll need your stock’s cost basis, the selling price, and how long you held the investment. The calculator then estimates your tax based on whether your gain is short-term or long-term and your overall taxable income. For more personalized strategies like tax-loss harvesting, consider TurboTax Experts can tailor a strategy just for you.. Previous Post How Automated Investing Can Help Take the Stress Out of… Next Post Quiz: What’s Your Investor Personality? Your refund is waiting Get started Written by Dawn Allcot Dawn Allcot has more than 20 years of experience as a personal finance writer covering taxes, credit, budgeting, and retirement for Intuit and other brands. She simplifies complex tax topics for individuals and small business owners at TurboTax, as well as GOBankingRates, Solvable, TheStreet, NiftyFifty+, and other top personal finance websites. More from Dawn Allcot Browse Related Articles Income and Investments Taxes on Stocks 101: What You Need to Know About Selling Stocks & Taxes 401K, IRA, Stocks A Complete Guide to Tax Loss Harvesting Taxes 101 What is Capital Gains Tax? Capital Gains Explained & How to Avoid Capital Gains Tax Income and Investments First Time Investors, Here’s What You Need To Know About Taxes 401K, IRA, Stocks Stock Up? Find Out Money Saving Tips When Selling Stock 401K, IRA, Stocks New to Investing? Don’t Miss These Key Tax Rules Income and Investments Capital Gains Tax Calculator Investments Tax Benefits of Real Estate Investing 401K, IRA, Stocks Grow Your Money By Investing in Stock, Bonds, & CDs Crypto Understanding Crypto and Capital Gains