A sample tax return with capital gains is the best way to learn Schedule D, because the rules only click when you work them from a real Form 1099-B. This article walks through how the capital gains part of a return is built, using the facts of a practice return: a single software engineer with a W-2, dividends, interest and two stock sales. It covers the 2025 rules behind each step, but not her answers. Those are yours to work out.
The taxpayer and her documents
Naomi is single, 34, and lives in Bellevue, Washington, which has no state income tax. She earns a salary as a software engineer and invests through a taxable brokerage account. In 2025 she received dividends and sold two stock positions: one she had held for years and one she bought and sold within the same year. She takes the standard deduction.
She brings four documents:
- Form W-2. Her wages and federal withholding.
- Form 1099-DIV. Box 1a is total ordinary dividends; box 1b is the qualified part of that total.
- Form 1099-INT. Interest from her brokerage account.
- Form 1099-B. Each sale with its dates, proceeds and cost basis, split into short-term and long-term, with a note on whether the basis was reported to the IRS.
On this return you can also start in "What's missing?" mode, where Naomi sends only part of her brokerage statement and you work out what to ask her for.
Step 1: interest and dividends, and whether Schedule B applies
Taxable interest goes on Form 1040, line 2b. Ordinary dividends (1099-DIV box 1a) go on line 3b, and the qualified part (box 1b) goes on line 3a. Line 3a is not extra income: it's a piece of line 3b, shown separately so it can be taxed at the capital gains rates.
Schedule B is required when taxable interest or ordinary dividends are over $1,500, among other triggers. Look at each of her totals and decide whether she needs it.
Step 2: short-term or long-term
The holding period sets the rate. Under the Schedule D instructions, a gain or loss on an asset held one year or less is short-term and is taxed like wages. One held more than one year is long-term and gets the lower capital gains rates. The 1099-B usually sorts sales into the two groups for you, but check the dates: a sale one day short of a year is still short-term.
Step 3: Form 8949, or straight to Schedule D
Every sale is reported either on Form 8949, which then totals onto Schedule D, or as a total directly on Schedule D. The Schedule D instructions allow the shortcut, line 1a for short-term and line 8a for long-term, when:
- the 1099-B shows the basis was reported to the IRS,
- it shows no adjustments in box 1f or 1g (for example, no wash sale loss disallowed),
- the Ordinary box in box 2 and the QOF box in box 3 aren't checked, and
- you don't need to make any adjustment to the basis or the type of gain or loss.
Anything else goes on Form 8949 first, in the box that matches the 1099-B: A (short-term) or D (long-term) when basis was reported, B or E when it wasn't, and C or F when there's no 1099-B at all. New for 2025, Form 8949 also has separate boxes for digital asset sales reported on Form 1099-DA.
Read the note on Naomi's 1099-B and decide which route each of her two sales takes.
Step 4: netting on Schedule D
Schedule D nets the two groups separately first: short-term gains and losses to a net short-term result on line 7, long-term to a net long-term result on line 15. Line 16 combines them. The combined result goes to Form 1040, line 7a.
If line 16 is a net loss, only $3,000 of it ($1,500 married filing separately) comes off other income this year. The rest carries forward to the next year. Naomi's sales are both gains, so the loss limit doesn't come up on her return. Our capital loss carryover return practices that case.
Step 5: the tax, at two different rates
Net long-term gain and qualified dividends are taxed at 0%, 15% or 20%. Everything else, short-term gain included, is taxed at the regular rates. Unless Schedule D lines 18 or 19 have an amount (28% rate gain or unrecaptured section 1250 gain, which Naomi doesn't have), the tax is figured on the Qualified Dividends and Capital Gain Tax Worksheet in the Form 1040 instructions, not straight from the Tax Table.
The worksheet stacks the lower-rate income on top of the ordinary income, then sees which band it falls in. The 2025 thresholds, from the IRS worksheets:
| Filing status | 0% rate up to | 15% rate up to |
|---|---|---|
| Single | $48,350 | $533,400 |
| Married filing jointly | $96,700 | $600,050 |
| Head of household | $64,750 | $566,700 |
| Married filing separately | $48,350 | $300,000 |
Above the 15% threshold, the rate is 20%. The thresholds are measured against taxable income (Form 1040, line 15), not against the gain alone.
A worked example with different numbers
Here are three made-up single filers, not Naomi, so you can see how the stacking works. Each has $8,000 of qualified dividends and net long-term gain.
- Taxable income $45,000. Ordinary income is $45,000 minus $8,000, or $37,000. The 0% band runs to $48,350, leaving $11,350 of room. All $8,000 fits, so it's taxed at 0%.
- Taxable income $52,000. Ordinary income is $44,000. Room in the 0% band is $48,350 minus $44,000, or $4,350, taxed at 0%. The other $3,650 is taxed at 15%: $547.50.
- Taxable income $70,000. Ordinary income is $62,000, already past $48,350, so there's no 0% room. All $8,000 is taxed at 15%: $1,200.
In each case the ordinary income is taxed at the regular rates as usual; the worksheet just keeps the two kinds of income apart. For Naomi, work out her taxable income, split it the same way, and see where her preferential income lands.
Common mistakes on a sample tax return with capital gains
- Counting qualified dividends twice. Line 3a is part of line 3b, not in addition to it.
- Taxing short-term gain at the capital gains rate. One year or less is ordinary income.
- Taking the line 1a or 8a shortcut when it doesn't apply. A wash sale adjustment or basis not reported to the IRS means Form 8949.
- Picking the wrong Form 8949 box. The box follows what the 1099-B says about basis reporting, not what you think the basis is.
- Putting capital gain distributions on line 3b. 1099-DIV box 2a goes to line 7a or Schedule D, not with ordinary dividends.
- Figuring the tax from the Tax Table. With qualified dividends or long-term gain, use the worksheet, or the lower rates never get applied.
- Measuring the 0% band against the gain alone. The thresholds apply to taxable income, with the gain stacked on top.
- Deducting a whole net loss. The limit is $3,000 a year ($1,500 married filing separately), with the rest carried forward.
Why practice this on a full sample tax return
Capital gains touch the whole return: Schedule B and Schedule D feed Form 1040, the deduction sets taxable income, and taxable income decides the rate the gains are taxed at. Preparing the whole return, then checking your Schedule D and your tax against a finished return, shows whether you read the 1099-B correctly. To see where each of these lines sits on the form, use the interactive Form 1040.
Sources
- Instructions for Schedule D (Form 1040) (2025)
- Form 8949 (2025), Sales and Other Dispositions of Capital Assets
- Schedule B (Form 1040) (2025), Interest and Ordinary Dividends
- Publication 550, Investment Income and Expenses
Frequently asked questions
Do I need Form 8949 for every stock sale?
No. If the 1099-B shows the basis was reported to the IRS, shows no adjustments, and nothing needs to be changed, the totals can go directly on Schedule D, line 1a (short-term) or line 8a (long-term). Otherwise the sale goes on Form 8949 first.
What is the 0% capital gains threshold for 2025?
Taxable income up to $48,350 for single filers, $96,700 married filing jointly and $64,750 head of household. Qualified dividends and long-term gain that fall within that amount, stacked on top of ordinary income, are taxed at 0%.
How are short-term capital gains taxed?
At the regular income tax rates, the same as wages. Only gains on assets held more than one year get the lower long-term rates.
How much of a capital loss can I deduct?
Up to your capital gains plus $3,000 ($1,500 married filing separately) a year. Any loss beyond that carries forward to future years.