Schedule D: Capital Gains and Losses for H-1B Visa Holders
Schedule D is where all your capital gains and losses — from RSU sales, ESPP dispositions, stock trades, and Indian investments — come together. Understanding the rates, the Net Investment Income Tax, and how Form 8949 feeds into Schedule D is essential for accurate filing.
Misclassified holding periods change your tax rate by up to 17%
- Short-term gains are taxed at your ordinary income rate (up to 37%). Long-term gains are taxed at 0%, 15%, or 20% depending on income.
- Misclassifying a short-term gain as long-term — or vice versa — can trigger an IRS notice and recalculation with penalties and interest
- H-1B holders with RSU and ESPP income frequently exceed the $200,000 AGI threshold that triggers the additional 3.8% Net Investment Income Tax
What Is Schedule D?
Schedule D (Form 1040) — "Capital Gains and Losses" — is the IRS form where you summarize all capital asset transactions for the year. It is not where you list individual sales — that happens on Form 8949. Schedule D aggregates the totals from Form 8949 and computes your net capital gain or loss.
Think of it this way: Form 8949 is the detailed ledger. Schedule D is the summary that feeds into Form 1040 Line 7 (capital gain or loss).
Short-Term vs Long-Term Rates
The tax rate on capital gains depends entirely on how long you held the asset before selling:
| Holding Period | Classification | Tax Rate (2026) |
|---|---|---|
| 1 year or less | Short-term capital gain | Ordinary income rates: 10%, 12%, 22%, 24%, 32%, 35%, or 37% |
| More than 1 year | Long-term capital gain | Preferential rates: 0%, 15%, or 20% |
| Net capital loss | Loss deduction | Deduct up to $3,000/year against ordinary income; carry forward the rest |
For most H-1B holders at tech companies, the relevant long-term rate is 15%. The 0% rate applies only to taxable income below $49,025 (single) or $98,050 (MFJ) in 2026 — unlikely for most H-1B salaries. The 20% rate kicks in above $539,900 (single) or $607,350 (MFJ).
How Form 8949 Feeds Into Schedule D
Schedule D has two parts:
- Part I — Short-Term: Totals from Form 8949 for assets held one year or less. These go on Schedule D Lines 1a through 7.
- Part II — Long-Term: Totals from Form 8949 for assets held more than one year. These go on Schedule D Lines 8a through 15.
Each section of Form 8949 (Box A, B, or C for short-term; Box D, E, or F for long-term) maps to a specific line on Schedule D. The totals for proceeds, cost basis, adjustments, and gain/loss carry forward automatically.
Schedule D Line Flow
Form 8949 Part I (Box A) totals → Schedule D Line 1a. Form 8949 Part I (Box B) totals → Schedule D Line 2. Form 8949 Part I (Box C) totals → Schedule D Line 3. Same pattern for Part II mapping to Lines 8a, 9, and 10. Net short-term on Line 7. Net long-term on Line 15. Combined on Line 16.
Net Investment Income Tax (3.8% Surtax)
Beyond the regular capital gains rates, high earners face an additional 3.8% tax under IRC Section 1411 — the Net Investment Income Tax (NIIT). This applies when your Modified Adjusted Gross Income exceeds:
- $200,000 for single filers
- $250,000 for married filing jointly
The 3.8% applies to the lesser of: (a) your net investment income (capital gains, dividends, interest, rental income), or (b) the amount by which your MAGI exceeds the threshold.
Example: NIIT on RSU Capital Gains
You are single with $180,000 in W-2 wages and $50,000 in long-term capital gains from RSU sales. Your AGI is $230,000, which exceeds the $200,000 threshold by $30,000. Your net investment income is $50,000. The NIIT applies to the lesser: $30,000 × 3.8% = $1,140 in additional tax, reported on Form 8960.
Wash Sale Rules
If you sell a stock at a loss and repurchase the same (or "substantially identical") security within 30 days before or after the sale, the loss is disallowed under IRC Section 1091. The disallowed loss gets added to the basis of the replacement shares.
This is particularly relevant for H-1B holders with RSU vesting schedules. If you sell company stock at a loss and your RSUs vest within 30 days (acquiring the same stock), the wash sale rule applies. The loss is deferred, not permanently lost — it increases the basis of the newly vested shares.
Wash sale adjustments appear on Form 8949 with code "W" in column (f). The disallowed loss amount is entered as a positive number in column (g), which reduces the reported loss to zero.
H-1B Specific Scenarios
RSU Sales
The capital gain on RSU sales is the difference between the sale price and the FMV at vesting. Most same-day sales produce minimal gain. Shares held over a year get long-term treatment. See RSU Cost Basis for the $0 basis correction process.
ESPP Dispositions
ESPP capital gains depend on the disposition type. After accounting for the ordinary income component, the remaining gain flows to Schedule D. Read the ESPP Section 423 guide for the full breakdown.
Indian Stock Sales
Capital gains on Indian equities (sold through Zerodha, ICICI Direct, etc.) must be reported on Schedule D in USD. Convert the rupee amounts using the IRS yearly average exchange rate. Indian capital gains tax paid may qualify for a Foreign Tax Credit.
When Is Schedule D Required?
You must file Schedule D if you have any of the following:
- Capital gains or losses from stock sales (including RSU and ESPP)
- Capital gain distributions from mutual funds (reported on 1099-DIV Box 2a)
- A gain or loss from Form 4797 (sale of business property — rare for H-1B)
- Capital loss carryforward from a prior year
There is one exception: if your only capital gains are capital gain distributions (from mutual funds) and you have no capital losses, you can report them directly on Form 1040 Line 7 without filing Schedule D.
Common Mistakes
- Mixing up short-term and long-term. The holding period for RSUs starts at vesting, not at grant. For ESPP, the holding period for capital gains purposes starts at the purchase date.
- Ignoring wash sales from RSU vesting. If you sell company stock at a loss and RSUs vest within 30 days, the wash sale rule applies. Many filers miss this because they did not "buy" anything — but vesting is treated as an acquisition.
- Forgetting the NIIT. With a tech salary plus capital gains, many H-1B holders exceed the $200,000 threshold. Failing to file Form 8960 triggers an IRS notice.
- Not reporting Indian stock sales. As a US tax resident, your worldwide capital gains go on Schedule D. Selling stocks in India and not reporting them is a compliance failure.
- Exceeding the $3,000 loss deduction. If net losses exceed $3,000, you can only deduct $3,000 against ordinary income. The remainder carries forward. Some filers claim the full loss, triggering an IRS correction.
How Our Platform Handles This
H1B TaxFile generates Schedule D automatically from your transaction data:
- All Form 8949 transactions are automatically classified as short-term or long-term and routed to the correct Schedule D section.
- RSU basis corrections, ESPP adjustments, and wash sale codes are propagated through to Schedule D totals without manual intervention.
- The platform calculates whether the Net Investment Income Tax applies and generates Form 8960 if needed.
- Capital loss carryforwards from prior years can be entered and are applied correctly on Schedule D Line 14.
- Indian stock sales are converted from INR to USD using the IRS average annual rate and included in the correct Schedule D section.
Frequently Asked Questions
Skip the complexity. We handle all of this for you.
H1B TaxFile supports every form in this guide — FATCA, PFIC, FTC, RSU basis correction, and 22 more H-1B-specific features. Flat price, no surprises.
H1B TaxFile Team
Written by the H1B TaxFile editorial team — tax professionals and software engineers who specialize in U.S. federal tax filing for H-1B visa holders, F-1 students, and nonresident aliens.
Reviewed by a licensed CPA with international tax experience.
Disclaimer: This guide is for educational purposes only and does not constitute tax or legal advice. Tax laws are complex and change frequently. Consult a qualified tax professional for advice specific to your situation.