Skip to content
FiftyCalc Free calculators for all 50 states

Stock Calculator

Test cases replayed : 2 of 2 match · Methodology · Sources

Enter the number of shares, the price you paid, the price you sold at (or a target price) and any trading fees.

Result

Sample figures

Profit or loss—

Total cost (cost basis) —

  • Net sale proceeds—
  • Return on investment—
  • Annualized return—

Estimate for planning only, not tax, legal, financial or medical advice. Check important figures with the official source listed on this page.

Stock Calculator

Number of shares: enter 0 or more. Prefilled example: 100.

Buy price per share, in dollars: enter 0.0001 or more. Prefilled example: 50.

Sell price per share, in dollars: enter 0 or more. Prefilled example: 65.

Commission and fees on the purchase, in dollars: enter 0 or more. Prefilled example: 0.

Commission and fees on the sale, in dollars: enter 0 or more. Prefilled example: 0.

Years held: enter a number from 0.01 to 100. Prefilled example: 2.

How to use this calculator

Fill in the fields in this order; each step takes you to its field.

  1. Number of shares: enter 0 or more.
  2. Buy price per share, in dollars: enter 0.0001 or more.
  3. Sell price per share, in dollars: enter 0 or more.
  4. Commission and fees on the purchase, in dollars: enter 0 or more.
  5. Commission and fees on the sale, in dollars: enter 0 or more.
  6. Years held: enter a number from 0.01 to 100.
  7. Read the result: Profit or loss; the panel also shows Total cost (cost basis), Net sale proceeds, Return on investment and Annualized return.

Sources

How this calculator works

Cost basis = shares × buy price + purchase fees. Net proceeds = shares × sell price − sale fees. Profit = proceeds − cost basis, and return = profit ÷ cost basis × 100.

Annualized return = (proceeds ÷ cost)^(1 ÷ years) − 1, the compound annual growth rate over the holding period. Dividends and taxes are not included.

The formula

  1. C=s×buy+c1
  2. P=s×se−c2
  3. Pr=P−C
Symbols used in the formula
SymbolMeaningUnit
sNumber of shares
buyBuy price per share$
seSell price per share$
c1Commission and fees on the purchase$
c2Commission and fees on the sale$
CTotal cost (cost basis)$
PNet sale proceeds$
PrProfit or loss$

Worked example

Number of shares100
Buy price per share$50
Sell price per share$65
Commission and fees on the purchase$0
Commission and fees on the sale$0
Years held2
Total cost (cost basis)$5,000.00
Net sale proceeds$6,500.00
Return on investment30%
Annualized return14.02%
  1. C=100×50+0=5,000
  2. P=100×65−0=6,500
  3. Pr=6,500−5,000=1,500

Profit or loss $1,500.00

Each step uses the unrounded value of the step before it; figures on this page are rounded for display.

Frequently asked questions

How much do I make if I buy 100 shares at $50 and sell at $65?

$1,500 before fees and taxes, a 30% return. Held two years, that is about 14.02% a year.

Are stock profits taxed?

Gains are taxed when you sell in a taxable account. The IRS taxes gains on shares held more than a year at long-term capital gains rates, and shorter holdings as ordinary income.

Questions answered

Related calculators