Paying taxes on stocks comes down to three things: what kind of income you had (a sale, a dividend, or both), how long you owned the shares, and where your total income lands. Sales produce a capital gain or loss that you report on Form 8949 and Schedule D; dividends are reported on Schedule B or directly on Form 1040. You pay the resulting balance electronically through IRS Direct Pay or EFTPS, or by mailing a check with Form 1040-V. If you have substantial investment income during the year, you may also owe estimated tax each quarter rather than waiting until April.
When You Actually Owe Tax
A stock going up in value does not trigger tax. That is an unrealized gain, and the IRS does not touch it. Tax kicks in the moment you sell and lock in a profit. The taxable amount is the difference between your sale proceeds and your cost basis, which is what you originally paid including commissions.1Internal Revenue Service. Topic No. 409, Capital Gains and Losses
Dividends work on a different clock. You owe tax on them in the year they are paid, whether you take the cash or reinvest it automatically. Your brokerage tracks both sales and dividends and reports them on year-end forms that become the starting point for your return.
The Rate Depends on How Long You Held the Shares
One year is the dividing line. Sell shares you have owned for a year or less, and the profit is a short-term capital gain, taxed at the same rates as your wages. For 2026, those ordinary rates run from 10% to 37%.1Internal Revenue Service. Topic No. 409, Capital Gains and Losses
Hold the shares more than a year and the gain becomes long-term, taxed at a preferential rate of 0%, 15%, or 20% depending on your taxable income and filing status.2Office of the Law Revision Counsel. 26 USC 1222 – Other Terms Relating to Capital Gains and Losses The thresholds are set each year by IRS revenue procedure. For 2026, a single filer with taxable income up to $49,450 pays 0% on long-term gains; the 15% rate covers income up to $545,500; anything above that is taxed at 20%. Married couples filing jointly get roughly double those breakpoints. Because the rate is keyed to total taxable income, a large sale can push part of your gain into a higher bracket even if your salary alone wouldn’t.
Qualified vs. Ordinary Dividends
Dividends split into two categories. Ordinary dividends are taxed at your regular income tax rate. Qualified dividends get the same 0%, 15%, or 20% preferential rates as long-term capital gains.3Internal Revenue Service. Topic No. 404, Dividends and Other Corporate Distributions
To qualify for the lower rate, you must hold the stock for at least 61 days during the 121-day period beginning 60 days before the ex-dividend date. Buy right before a dividend and flip the shares soon after, and the dividend gets taxed as ordinary income instead. Your Form 1099-DIV splits qualified from non-qualified amounts, so in most cases you don’t have to run the holding-period math yourself.
The 3.8% Surtax for Higher Earners
If your modified adjusted gross income crosses certain thresholds, an additional 3.8% Net Investment Income Tax applies on top of the regular capital gains and dividend rates. The thresholds are $200,000 for single or head of household filers, $250,000 for married filing jointly, and $125,000 for married filing separately.4Internal Revenue Service. Topic No. 559, Net Investment Income Tax These amounts have not been adjusted for inflation since the tax took effect in 2013.
The surtax is calculated on Form 8960 and applies to the lesser of your net investment income or the amount by which your modified AGI exceeds the threshold.5Internal Revenue Service. Instructions for Form 8960 A single filer with $220,000 in modified AGI and $30,000 of capital gains pays the 3.8% only on $20,000, not on the full gain.
Reporting Sales and Dividends on Your Return
Your brokerage sends two forms in the winter. Form 1099-B lists every stock sale from the prior year with trade dates and gross proceeds.6Internal Revenue Service. Instructions for Form 1099-B Form 1099-DIV summarizes dividends and distributions.7Internal Revenue Service. Instructions for Form 1099-DIV
Transfer the sale data to Form 8949, one line per transaction: stock description, purchase date, sale date, proceeds, and cost basis.8Internal Revenue Service. Instructions for Form 8949 The difference is your gain or loss. Short-term sales go in Part I; long-term in Part II. Totals flow to Schedule D of Form 1040, which is where your overall capital gain or loss lands.9Internal Revenue Service. 2025 Instructions for Schedule D (Form 1040)
The IRS matches your Schedule D against the 1099-B your brokerage also files with them. Mismatches routinely trigger automated notices, so check that every sale on the 1099-B is accounted for before you file.
Using Losses to Cut the Bill
Losses on stock sales offset gains dollar-for-dollar. A $5,000 gain paired with a $3,000 loss leaves only $2,000 taxable. Short-term losses first offset short-term gains and long-term losses first offset long-term gains, with anything left over crossing to the other category.
If losses exceed gains for the year, you can deduct up to $3,000 of the excess against ordinary income ($1,500 for married filing separately).1Internal Revenue Service. Topic No. 409, Capital Gains and Losses Any remaining loss carries forward indefinitely, keeping its short-term or long-term character.10Office of the Law Revision Counsel. 26 USC 1212 – Capital Loss Carrybacks and Carryovers
One trap to know: the wash sale rule. Sell at a loss and buy the same or a substantially identical security within 30 days before or after the sale, and the IRS disallows the loss.11Office of the Law Revision Counsel. 26 USC 1091 – Loss From Wash Sales of Stock or Securities The 30 days runs both directions, creating a 61-day blackout window. The disallowed amount gets added to the basis of the replacement shares, so the benefit is deferred rather than lost. Brokerages usually flag wash sales on your 1099-B, but if you trade the same ticker across multiple accounts, tracking it is on you.
Choosing Which Shares You Sold
If you bought the same stock in more than one lot at different prices, which shares count as “sold” changes your bill. The default is first-in, first-out: the IRS assumes you sold your oldest shares first, which often means the cheapest.12Internal Revenue Service. Publication 551, Basis of Assets Specific identification lets you pick a particular lot instead, provided you designate it at the time of sale. Most brokerages let you select lots online before the trade settles. Choosing a higher-basis lot leaves a smaller taxable gain.
Inherited stock is handled differently. Its cost basis resets to the fair market value on the date the original owner died, wiping out earlier appreciation for tax purposes.13Office of the Law Revision Counsel. 26 U.S. Code 1014 – Basis of Property Acquired From a Decedent
Paying What You Owe
Once your return is done, the IRS offers several payment routes. Direct Pay transfers money straight from a checking or savings account with no registration and no fee, capped at $10 million per transaction.14Internal Revenue Service. Direct Pay With Bank Account The Electronic Federal Tax Payment System (EFTPS) requires a one-time enrollment and adds scheduling and payment history, which makes it the better fit for anyone paying quarterly.15Internal Revenue Service. Pay Personal Taxes From Your Bank Account
If you prefer paper, send a check or money order payable to “United States Treasury” with Form 1040-V, the payment voucher. Don’t staple the voucher to the check or the return. The mailing address depends on your state and is printed on the back of the voucher.16Internal Revenue Service. Form 1040-V Payment Voucher for Individuals
One point catches people every year. Filing an extension with Form 4868 gives you more time to file, not more time to pay. You still owe your estimated tax by the original April due date, and interest and a failure-to-pay penalty accrue on anything unpaid after that.17Internal Revenue Service. Taxpayers Should Know That an Extension to File Is Not an Extension to Pay Taxes
When Quarterly Payments Come Into Play
If you expect to owe $1,000 or more after subtracting withholding and refundable credits, you’re required to make estimated quarterly payments during the year.18Internal Revenue Service. Estimated Tax That commonly catches people whose investment income is not covered by employer withholding. For 2026, the four due dates are April 15 and June 15, 2026, September 15, 2026, and January 15, 2027. Underpayment triggers a penalty currently calculated at a 7% annual rate.19Internal Revenue Service. Quarterly Interest Rates
Because projecting a year of investment income is guesswork, the IRS provides a safe harbor: pay at least 100% of last year’s total tax through withholding and estimated payments (110% if your prior-year AGI exceeded $150,000, or $75,000 if married filing separately) and no penalty applies, even if you end up owing more at filing.20Internal Revenue Service. Underpayment of Estimated Tax by Individuals Penalty Form 1040-ES walks through the projection and payment calculation.18Internal Revenue Service. Estimated Tax
Stocks Inside Retirement Accounts
Everything above applies to stocks in a regular taxable brokerage account. If your shares sit inside a traditional IRA or 401(k), sales and dividends inside the account are not taxed as they happen; you pay ordinary income tax when you withdraw money in retirement.21Internal Revenue Service. Traditional IRAs Roth accounts go further: qualified withdrawals are tax-free. Before working out any of the capital gains math, confirm which type of account the stock was held in.
State Tax Is a Separate Bill
Federal is only part of it. Most states tax capital gains as ordinary income at their regular income tax rate, stacked on top of the federal rate. A few states have no income tax at all. Others impose rates that push combined federal and state taxation above 50% for high earners. State rules on loss deductions and carryovers vary as well, so check your state tax agency for the rate and forms that apply to you.