Stocks course · Section 5: Risk, Leverage and Testing
Stock Taxes and Record Keeping: What Investors Need to Track
How dividends and capital gains are usually taxed, cost basis and lots, currency conversion, US withholding for non-US investors and the records to keep.
Advanced6 min read·6:46 video·Lesson 22 of 26·quiz: 4 questions
▶ Video lesson · 6:46Watch on YouTube ↗
On this page +
Most countries tax stock investors on two things: dividends, taxed as income, and capital gains, the profit when you sell shares for more than you paid. Which rules apply depends mainly on where you live, not on where the stock is listed. For a non-US investor in US stocks, the US usually takes tax from dividends at source, while gains are mostly a matter for the home country. Rates and rules change, often every budget, so keep complete records and check the current rules with your tax authority or a qualified adviser.
Risk
This lesson is general education, not tax advice. Tax mistakes can cost more than trading mistakes, and penalties for unreported foreign income can be severe in many countries.
The two taxable events
- Dividends: usually taxed in the year you receive them, whether or not you reinvest them.
- Capital gains: usually taxed only when you sell (a realised gain). A rise in value you have not sold is unrealised and in most countries is not taxed yet. Realised losses can often reduce taxable gains, subject to local rules.
Cost basis: what you really paid
Your cost basis is the purchase price plus buying costs; your proceeds are the sale price minus selling costs.
Example
You buy 20 shares at $150 and pay $2 commission: basis = $3,002. You sell all 20 at $180 and pay $2: proceeds = $3,598. Your capital gain is $3,598 - $3,002 = $596.
Several purchases of the same stock
If you bought the same stock at different times (different lots), which shares you are treated as selling changes the gain.
Example
You bought 10 shares at $100 and later 10 at $140. You sell 10 at $150.
- First in, first out (FIFO): the $100 shares are sold first, gain = 10 x $50 = $500.
- Specific identification (where allowed): you choose the $140 lot, gain = 10 x $10 = $100.
- Average cost (used in some countries): cost $120 a share, gain = 10 x $30 = $300.
Your country decides which methods are allowed; your broker may let you choose a default.
Holding periods
Some countries tax short-term and long-term gains differently. In the US, for example, gains on assets held for more than a year are taxed at lower long-term rates for US taxpayers. Pakistan's tax on gains from securities has also depended on the holding period and has changed in several budgets. Check the rules for the year you sell, not the year you buy.
US taxes for non-US investors
- Dividends: the default US withholding is 30%, reduced if a tax treaty applies and you have filed a valid W-8BEN (see how to buy US stocks). Your home country may then tax the dividend too, sometimes allowing a credit for the US tax already withheld. Whether you get a credit, and how much, depends on your country's rules.
- Capital gains: generally not taxed by the US for non-resident individuals, with exceptions (for example, people who spend long periods in the US). Your home country may tax them.
- Annual statement: US brokers usually issue non-US clients a Form 1042-S, showing US-source income such as dividends and the tax withheld. Keep it.
- Estate tax: US shares can be subject to US estate tax for non-residents above a fairly low threshold, unless a treaty changes this. Larger investors should get advice.
Currency: your gain in your own money
Your home tax authority usually wants figures in your home currency, so exchange rates become part of the gain.
Example
You buy 10 shares at $150 ($1,500) when $1 = PKR 280: cost PKR 420,000. You sell at $180 ($1,800) when $1 = PKR 285: proceeds PKR 513,000. The gain in rupees is PKR 93,000. Your $300 dollar gain converted at the sale rate is only PKR 85,500; the rest comes from the dollar rising against the rupee. Which rates you must use (trade date, official rates, average rates) is a local rule. These exchange rates are made up for the example.
Rules that catch frequent traders
- Wash sales (US taxpayers): a loss is disallowed for now if you buy the same or a substantially identical security within 30 days before or after selling at a loss.
- Other countries have similar rules, such as the UK's 30-day "bed and breakfast" rule. Selling for a tax loss and buying straight back may not work where you live.
- In some countries, very frequent trading can be treated as a business, with different tax treatment.
What records to keep
| Record | Why you need it |
|---|---|
| Trade confirmations: date, ticker, quantity, price, fees | Cost basis and proceeds for every lot |
| Monthly and annual broker statements | Proof of holdings, dividends and fees |
| Dividend records and tax withheld (Form 1042-S for US brokers) | Income and foreign tax credits |
| Exchange rates used for every trade and dividend | Converting to your home currency |
| Bank transfer receipts in and out | Showing the source of funds and money brought home |
| Your W-8BEN and account opening documents | Proof of status and treaty claims |
Download statements regularly: brokers sometimes limit how far back you can download them, and accounts can be closed. Many tax authorities can review several past years, so keep records for at least as long as your country's rules require.
Example
A simple trade log in a spreadsheet: Date | Ticker | Buy/Sell | Shares | Price | Fees | USD/PKR rate | Value in PKR | Lot ID | Notes. Add a second sheet for dividends: Date | Ticker | Gross | US tax withheld | Net | Rate | Net in PKR. Fill it in the day you trade, not at tax time.
How tax shapes your strategy
- Turnover costs tax as well as fees. High-turnover strategies can lose much of their edge to tax in countries that tax short-term gains heavily.
- After-tax backtests. For your own planning, estimate tax on top of trading costs (see backtesting stock strategies).
- Dividends versus buybacks. For investors who lose part of each US dividend to withholding, companies that return cash through buybacks can be more tax-efficient (see dividends and buybacks).
Tip
Your trade log for tax and your trading journal can be the same file. Add columns for the setup, the stop and the R-multiple, and you have the journal described in trading psychology and journaling.
Next, the Pro section begins with the trader's biggest enemy: trading psychology and journaling.
Key takeaways
- Most countries tax two things: dividends as income and capital gains when you sell for more than your cost.
- Where you live decides most of your tax; for non-US investors the US mainly taxes dividends through withholding.
- Cost basis includes fees; with several purchase lots, the method used (such as FIFO) changes the gain.
- Exchange-rate moves can change your gain in your home currency, so record the rate on every trade date.
- Rules and rates change, so keep complete records and check current rules with your tax authority or an adviser.
Quiz: check what you learned
0/4 answeredAnswer every question to finish the lesson. Wrong answers are fine: read the explanation and try again.
⚠ Not financial advice — educational signals only. Read the disclaimer.