# What is my stock profit?

Computes the profit or loss and the return on shares bought and sold at prices you type, after commissions and with dividends, and the annualized return and holding period when you add the dates.

- Page: https://www.acalculator.org/finance/stock-profit-calculator
- JSON spec: https://www.acalculator.org/finance/stock-profit-calculator.json
- Version: 15351c6f770f

## Default answer

Example with the default inputs (Number of shares 100, Buy price per share $50.00, Sell price per share $65.00, Commission to buy $0.00, Commission to sell $0.00, Dividends received $0.00): Buying 100 shares at $50.00 and selling at $65.00 gives a profit or loss of $1,500.00.

## Inputs

| Key | Label | Description |
| --- | --- | --- |
| shares | Number of shares | How many shares you bought and sold. Fractional shares are fine. |
| buy | Buy price per share | The price you paid for each share. |
| sell | Sell price per share | The price you sold each share for, or the price you expect to sell at. |
| buyfee | Commission to buy | Commissions and fees paid on the purchase, in dollars for the whole trade. |
| sellfee | Commission to sell | Commissions and fees paid on the sale, in dollars for the whole trade. |
| div | Dividends received | All the cash dividends you received while you held the shares, in dollars. |
| bought | Date bought | The trade date of the purchase. Add both dates for the annualized return and the holding period. |
| sold | Date sold | The trade date of the sale. |

## Outputs

| Key | Label | Description |
| --- | --- | --- |
| profit | Profit or loss | Net sale proceeds plus dividends minus the total cost. Negative for a loss. |
| roi | Return | The profit as a percent of the total cost. |
| cost | Total cost | Shares × buy price plus the commission to buy: your cost basis. |
| proceeds | Net sale proceeds | Shares × sell price minus the commission to sell. |
| breakEven | Break-even sell price | The sell price per share that gives a profit of exactly $0. |
| change | Share price change | The sell price minus the buy price, as a percent of the buy price. |
| days | Days held | Calendar days from the buy date to the sell date. |
| annualized | Annualized return | The yearly rate that gives the same return over the days held: (1 + return)^(365 ÷ days) − 1. |
| term | Holding period | Long-term when the shares were held more than one year, short-term otherwise (IRS rule). |

## Method

Profit = (shares × sell price − commission to sell) + dividends − (shares × buy price + commission to buy); return = profit ÷ total cost × 100.

## Assumptions

- Prices are what you type; nothing is looked up.
- Commissions are dollar amounts for the whole trade.
- Taxes are not taken out. Long-term and short-term follow the one-year rule of IRS Publication 550.
- This is an estimate, not tax or investment advice.

## Worked examples

1. shares = 100, buy = $50.00, sell = $65.00, buyfee = $10.00, sellfee = $10.00 gives profit = $1,480.00, cost = $5,010.00, proceeds = $6,490.00, roi = 29.540918%, breakEven = $50.20, change = 30%. Source: IRS Publication 550: basis includes the purchase commission and the amount realized is the sale price minus selling expenses (https://www.irs.gov/publications/p550).
2. shares = 40, buy = $120.35, sell = $98.10, buyfee = $4.95, sellfee = $4.95, div = $18.40 gives profit = -$881.50, cost = $4,818.95, proceeds = $3,919.05, roi = -18.292367%, breakEven = $120.14. Source: IRS Publication 550, basis and amount realized (https://www.irs.gov/publications/p550).
3. shares = 10, buy = $100.00, sell = $121.00, bought = 2024-03-01, sold = 2026-03-01 gives profit = $210.00, roi = 21%, days = 730, annualized = 10%, term = Long-term. Source: IRS Publication 550, holding period: more than 1 year is long-term (https://www.irs.gov/publications/p550).
4. shares = 10, buy = $100.00, sell = $110.00, bought = 2025-01-15, sold = 2026-01-15 gives days = 365, annualized = 10%, term = Short-term. Source: IRS Publication 550, holding period: count from the day after you bought through the day you sold (https://www.irs.gov/publications/p550).

## FAQ

### How do I calculate the profit on a stock?

Multiply the shares by the sell price and take off the commission to sell: that is what you got. Multiply the shares by the buy price and add the commission to buy: that is what you paid. The profit is the first minus the second, plus any dividends. 100 shares bought at $50 and sold at $65, with $10 each way, give $6,490 − $5,010 = $1,480.

### How is the return worked out?

The return is the profit as a percent of what you paid, including the commission to buy. $1,480 on a cost of $5,010 is a 29.54% return. The share price change (30% from $50 to $65) is higher, because it ignores the commissions.

### What is the break-even price?

It is the sell price per share at which you make exactly $0: (total cost + commission to sell − dividends) ÷ shares. For 100 shares that cost $5,010 with a $10 commission to sell, the break-even price is $50.20.

### What is the difference between short-term and long-term?

Under the IRS rule, shares held more than one year give a long-term gain or loss; shares held one year or less give a short-term one. The holding period starts the day after you buy and includes the day you sell, so shares sold on the one-year anniversary of the purchase are still short-term. Long-term gains usually have lower tax rates. Add both dates to see which one applies.

### What is the annualized return?

It is the yearly rate that gives the same return over the time you held the shares: (1 + return)^(365 ÷ days held) − 1. A 21% return over 730 days is 10% a year, because 1.1 × 1.1 = 1.21. Over a short time a small return can annualize to a large number, so read it with the days held.

### Does the calculator look up the stock price?

No. Every price is one you type, so the page works offline and never sends your numbers anywhere. Use the price from your trade confirmation, or the price you expect to sell at.

### Does it include taxes?

No. It shows the gain before tax. The total cost is your cost basis for tax purposes (the price plus the commission to buy), and the net sale proceeds are the amount realized (the price minus the commission to sell), as IRS Publication 550 describes.

## Sources

- Internal Revenue Service, Publication 550, Investment Income and Expenses: basis, amount realized, and holding period. https://www.irs.gov/publications/p550
- U.S. Securities and Exchange Commission, Investor.gov: Understanding fees. https://www.investor.gov/introduction-investing/getting-started/understanding-fees
