finance calculator

Stock Profit Calculator

Calculate profit, ROI, and totals for a stock trade with optional fees.

Results

Profit
$1,500 USD
ROI
30.00%
Cost basis
$5,000 USD
Sale proceeds
$6,500 USD

Overview

This stock profit calculator helps you quickly answer the basic questions around a trade: How much did I make (or lose)? What’s my return on investment (ROI)? And how do fees and commissions change the picture?

By entering the number of shares, your buy price, sell price, and any fees or commissions, the tool calculates your cost basis, sale proceeds, profit or loss, and ROI. It’s useful for sanity‑checking trades, setting profit targets, and comparing trades of different sizes.

How to use this calculator

  1. Enter the number of shares you bought and later sold (or plan to sell).
  2. Enter your buy price per share and sell price per share.
  3. Enter the total amount of fees and commissions associated with the trade (both buy and sell sides combined) in the Fees/commissions field.
  4. The calculator multiplies shares by buy price to get cost basis and by sell price to get sale proceeds, then subtracts fees from your gross profit.
  5. Review the profit (or loss), ROI, cost basis, and proceeds to see whether the trade meets your targets after trading costs.

Inputs explained

Shares
The number of shares bought and sold in the trade. For multiple fills at the same general prices, you can combine them into a single share count.
Buy price
The average purchase price per share. If you bought across multiple fills at different prices, use your weighted average buy price or your broker’s average cost.
Sell price
The average sale price per share. For partially filled orders at multiple prices, you can use the weighted average sale price to approximate combined proceeds.
Fees/commissions
The total trading costs associated with the trade in dollars, including commissions and transaction fees on both the buy and sell side. This amount is subtracted from your gross profit.

Outputs explained

Profit
Your net profit or loss in dollars after subtracting trading fees: (Sell price − Buy price) × Shares − Fees. A negative number indicates a loss.
ROI
Return on investment expressed as a percentage: Profit ÷ Cost basis. It normalizes profit relative to how much capital you put into the trade.
Cost basis
The total amount invested in the trade (excluding fees), calculated as Shares × Buy price. This is the amount you had at risk before selling.
Sale proceeds
The total amount received from selling the shares before subtracting fees, calculated as Shares × Sell price.

How it works

Profit = (sell − buy) × shares − fees.

ROI = profit ÷ cost basis.

Formula

Profit = (Sell − Buy) × Shares − Fees
ROI = Profit / Cost basis

When to use it

  • Checking whether a proposed sell price will hit your profit target after accounting for commissions and fees.
  • Comparing ROI across trades with different position sizes to see which strategies are more efficient in percentage terms.
  • Running quick what‑if scenarios for buy and sell prices while planning entries, exits, or stop levels.
  • Estimating gross profit and ROI before feeding results into a capital gains tax calculator or tax software.
  • Helping newer traders understand how seemingly small fees or spread differences impact profitable and unprofitable trades.

Tips & cautions

  • Always include all trading costs (commissions, transaction fees, and any per‑share fees) to avoid overestimating real profit.
  • Use ROI to compare trades across different time frames and sizes; a smaller trade can be more efficient than a larger one if its percentage return is higher.
  • If you buy or sell in multiple legs, compute a weighted average buy price and sell price and sum all fees to approximate the combined trade.
  • Remember that taxes, slippage, and FX effects (for foreign stocks) can further reduce net profit beyond what this calculator shows.
  • Consider tracking your trades in a journal that records profit, ROI, holding period, and risk taken so you can assess your strategy over time.
  • Does not include taxes, FX effects, borrow fees, dividend adjustments, or other costs that may apply to certain securities or accounts.
  • Assumes a single average buy price and a single average sell price; complex tax lots and multiple entry/exit prices may require more detailed cost basis calculations.
  • Does not model intraday mark‑to‑market or margin interest—those factors can materially alter the economics of leveraged or short trades.
  • Treats fees as a simple dollar total; some brokers embed costs in spread or per‑share pricing, which you may need to approximate.
  • Not a portfolio performance engine; it focuses on individual trades rather than time‑weighted or money‑weighted returns across accounts.

Worked examples

100 shares, buy $50, sell $65, $0 fees

  • Cost basis = 100 × $50 = $5,000.
  • Proceeds = 100 × $65 = $6,500.
  • Profit = ($65 − $50) × 100 − $0 = $1,500.
  • ROI = $1,500 ÷ $5,000 = 0.30 → 30%.

50 shares, buy $120, sell $135, $10 fees

  • Cost basis = 50 × $120 = $6,000.
  • Proceeds = 50 × $135 = $6,750.
  • Gross profit = ($135 − $120) × 50 = $750.
  • Net profit = $750 − $10 fees = $740.
  • ROI ≈ $740 ÷ $6,000 ≈ 12.3%.

Loss-making trade: 200 shares, buy $40, sell $35, $15 fees

  • Cost basis = 200 × $40 = $8,000.
  • Proceeds = 200 × $35 = $7,000.
  • Gross profit = ($35 − $40) × 200 = −$1,000.
  • Net result = −$1,000 − $15 fees = −$1,015 loss.
  • ROI ≈ −$1,015 ÷ $8,000 ≈ −12.7%.

Deep dive

This stock profit calculator shows profit, ROI, cost basis, and sale proceeds for a trade after accounting for fees and commissions.

Enter shares, buy and sell prices, and total trading costs to quickly see how much you made or lost and compare the efficiency of trades across your portfolio.

FAQs

Does this include taxes on gains or losses?
No. It shows profit or loss after trading fees only. Capital gains taxes, wash sale adjustments, and other tax effects are not included. Use a capital gains tax calculator or tax software for after-tax estimates.
What about FX conversion for foreign stocks?
Foreign exchange gains and losses are not modeled. If you trade in another currency, you may need to convert your costs and proceeds into your home currency using appropriate exchange rates and account for FX differences separately.
Can I use this for options, ETFs, or crypto?
Yes, as long as you have a buy price, sell price, share/contract quantity, and total fees, the math works the same. Just be mindful that options and derivatives may have additional complexities like time decay or assignment risk not captured here.
How should I handle multiple tax lots or partial fills?
For a quick estimate, use a weighted average buy price and sell price across the lots involved and sum the fees. For precise tax reporting, you’ll need to track individual lots and apply your chosen cost basis method (FIFO, specific ID, etc.).
Why is ROI useful in addition to absolute profit?
Absolute profit tells you how many dollars you made or lost, but ROI shows the efficiency of the trade relative to the capital you committed. It helps you compare a small, high‑percentage win to a larger, low‑percentage win and evaluate strategies more objectively.

Related calculators

This stock profit calculator is for informational and educational purposes only and does not constitute investment, tax, or financial advice. It provides simplified estimates of profit, ROI, cost basis, and proceeds based on the inputs you provide and does not account for all factors that can affect real-world investment performance, including taxes, foreign exchange, market impact, or margin costs. Always review trade confirmations, broker statements, and consult with qualified professionals before making trading or tax decisions.