US Stocks and Tax Filing

A lot of people invest in US stocks, and once you have investments and income, taxes are hard to avoid. These days, many tax software programs let you import tax forms and file automatically, but it is still very helpful to understand the basic concepts and logic behind how stock investing is taxed. Once you understand the rules, you may be able to reduce the tax you owe on investment income to some extent, and if you have losses, you can also use them more effectively to offset taxes.

This article provides a simple introduction to tax issues related to US stocks, with the goal of keeping things easy to understand. Let’s start with a table to give an overall picture:

Status Condition Capital gains tax Dividend tax Tax form required
US resident Citizen, green card holder, or meets the SPT Long-term gains: 0%, 15%, 20% Qualified dividends: 0%, 15%, 20% Schedule D
Short-term gains: taxed together with ordinary income Nonqualified dividends: taxed together with ordinary income
Nonresident Students / visiting scholars / employees, etc. staying for 183 days 30% 10% Schedule NEC
Living abroad 0% 10% No tax filing required

Tax Residency Status

When talking about taxes, the first thing to consider is your tax filing status. People with different statuses are taxed very differently on gains or losses from US stock investing. The first question is whether you are considered a US tax resident:

  • US tax resident: US citizens, green card holders, and people who meet the Substantial Presence Test (SPT)
  • To emphasize: if you are a US citizen or a US green card holder, your US stock investment income is still taxed as that of a US resident even if you do not live in the US.

The Substantial Presence Test means:

  • You were physically present in the US for at least 31 days during the current tax year (counted by calendar day; even if you were in the US for less than 24 hours on a given day, it still counts as one day; the same applies below); and
  • The total of your days in the US in the current tax year + 1/3 of your days in the previous year + 1/6 of your days in the year before that is at least 183 days

There are some exceptions to the Substantial Presence Test. For example, students and accompanying family members on F, J, M, or Q visas are generally still treated as nonresidents for their first five years even if they meet the SPT. There are also some dual-status and married filing jointly situations that we will not go into here. For details, please see our analysis of US tax residency:

One thing to note is that the tax year you are filing for must match your tax status for that year. For example, if you were not a resident in 2020 (did not meet the SPT) but did meet the SPT in 2021, then you would file 2020 taxes as a nonresident and 2021 taxes as a US resident. The rest of this article will also be divided into those two categories, so you can read the section that applies to you.

US Residents

For most US residents, the main tax items to consider are the following:

  • Capital gains: divided into long-term capital gains and short-term capital gains, which are taxed at different rates
  • Dividend income: divided into qualified and nonqualified dividends
  • Capital losses: losses from stocks can be used to offset taxable ordinary income, such as wages, thereby reducing the tax you owe

Capital Gains: Long-Term vs. Short-Term

Capital gains are one of the most common types of income from stock investing. For example, if you bought one share for $10 at the beginning of the year and sold it for $25 at the end of the year, your gain would be $15. Capital gains are split into short-term and long-term. If you held the stock for less than one year, the profit from selling it is a short-term gain. If you held it for more than one year, it is a long-term gain. The biggest difference is the tax rate that applies:

  • Long-term gains: The tax rate depends on your income bracket, with rates of 0%, 15%, and 20%. The chart below shows the 2021 long-term capital gains tax brackets. As you can see, if you file as single and your income is under $40,000, you owe no tax. Most people in the $40,000-$400,000 range pay 15%.
  • Short-term gains: Short-term gains are added directly to your total income for tax purposes. In other words, stock gains are effectively taxed at the highest marginal tax bracket you reach. The chart below shows the 2021 tax brackets for a single filer. As you can see, even if you have no other income and only short-term stock gains, the tax rate starts at 10%. If your salary is above $40,000, you will pay at least 22%. And if it is above $16,000, you will pay 32%. Compared with long-term gains, short-term gains can be taxed much more heavily.

From a tax-rate perspective, if stock trading is not your full-time job, it is generally better to aim for long-term gains when possible. Of course, market movement still matters most, and sometimes you need to sell when the time is right. Another important point is that this gain is only calculated when you actually sell the stock. If you continue holding the stock without selling, your realized gain remains $0 and there is nothing to report for tax purposes. What if some stocks are down while others are up? We will cover that in the section on tax treatment of losses below.

Most brokerage platforms will send you a 1099-B before tax season starts, or you can usually download it from the documents section of your account. From that form, you can easily see how much of your gains are long-term and how much are short-term. We will discuss wash sales in more detail in the section on losses.

Dividend Income

Dividend income is also very common. In general, dividends are divided into two categories: qualified and nonqualified.

Qualified dividends generally refer to dividends that:

  • Are paid by a US company or a qualified foreign entity
  • Meet the IRS definition of a dividend. For example, this excludes things like insurance premium refunds, annual patronage dividends from credit institutions, or