Orders, fills and positions
What does closing a position mean?
The short answer
Closing a position means making the opposite trade that cancels it. If you bought shares, you close by selling them. If you sold short, you close by buying them back. Closing locks in the result, whether a gain or a loss, and ends your exposure to price changes.
How it works
Say you bought 10 shares at 15 dollars and sell all 10 at 17. The position is closed, and you have realized a gain of 20 dollars before costs. Until then it was an unrealized gain, which can change.
You do not have to close everything at once. Selling 5 of the 10 shares closes half the position and leaves 5 open. Some brokers also close positions for you when you cannot meet a margin requirement.
A realized gain matters for tax purposes, and the IRS ties a gain to a sale. Rules differ by country and change over time.
Sources
- Fidelity: What are capital gains?Fidelity
- IRS: Topic no. 409, Capital gains and lossesIRS
- Investor.gov: Investor Bulletin, Understanding Margin AccountsInvestor.gov
Checked against these pages on 2026-12-01. Education only, not financial advice. Rules can differ by country and change over time.
Keep learning
Related questions
- What does it mean when an order is pending?
- What does order execution mean?
- What is an open position?
- What does going long mean?
- What does going short mean?
- Does a doji mean the price will reverse?
Want to try it, with fake money?
The lessons, the practice desk and Pal are free to start. You learn it by doing it, and nothing you do there costs a cent.
Create a free account