Calculate Stock Profit & Loss

Calculate profit, loss, ROI, and breakeven price for any stock trade including commissions.

The Stock Profit & Loss Calculator helps you evaluate the financial outcome of stock trades. Enter buy price, sell price, number of shares, and commissions to instantly see gross and net profit or loss, return on investment, and breakeven price. Supports both long and short selling positions for comprehensive trade analysis.

Your data stays in your browser
Was this tool useful?
Tutorial

How to Use This Tool

1
1

Enter Trade Prices

Input the buy price and sell price per share. Toggle short selling mode if you sold first and bought later.

2
2

Set Shares and Commissions

Enter the number of shares traded and any buy or sell commission fees charged by your broker.

3
3

Review Your Results

View your gross and net profit or loss, ROI percentage, total commissions, and breakeven price in the summary table.

Guide

Complete Guide to Stock Profit & Loss Calculation

Understanding Stock P&L

Stock profit and loss measures the financial result of buying and selling shares. Gross P&L is simply the price difference multiplied by the number of shares. Net P&L accounts for trading costs like broker commissions. Understanding the difference between gross and net returns is essential for accurately evaluating your trading performance and making better investment decisions.

The Impact of Commissions

Trading commissions directly reduce your profit on every trade. While many brokers now offer zero-commission trades on stocks, options and other instruments still carry fees. Even small per-trade commissions compound significantly for active traders making frequent trades. Always factor in round-trip costs (buy plus sell commissions) when evaluating whether a trade meets your minimum return threshold.

Short Selling Explained

Short selling means borrowing shares and selling them at the current price, hoping to buy them back later at a lower price. Your profit comes from the price decline. Short selling carries additional risks including unlimited loss potential and margin requirements. This calculator supports short mode so you can analyze bearish positions with the same precision as long trades.

Using P&L for Better Trading

Track every trade's P&L to identify patterns in your trading performance. Calculate your average win versus average loss to understand your risk-reward ratio. Use the breakeven price to set stop-loss orders that protect your capital. Review your ROI across different position sizes and holding periods to optimize your strategy over time.

Examples

Worked Examples

Example: Long position with commission

Given: Bought 50 shares at $80, sold at $95. Buy commission $9.99, sell commission $9.99.

1

Step 1: Total cost = 50 x $80 = $4,000.

2

Step 2: Total revenue = 50 x $95 = $4,750.

3

Step 3: Gross P&L = $4,750 - $4,000 = $750.

4

Step 4: Net P&L = $750 - $9.99 - $9.99 = $730.02.

5

Step 5: ROI = $730.02 / ($4,000 + $9.99) x 100 = 18.20%.

Result: Net profit of $730.02 with an ROI of 18.20%. Breakeven price was $80.40 per share.

Example: Short selling trade

Given: Short sold 100 shares at $150, bought back at $130. Buy commission $5, sell commission $5.

1

Step 1: Gross P&L = ($150 - $130) x 100 = $2,000.

2

Step 2: Net P&L = $2,000 - $5 - $5 = $1,990.

3

Step 3: ROI = $1,990 / ($130 x 100 + $5) x 100 = 15.31%.

Result: Net profit of $1,990 from the short position with an ROI of 15.31%.

Use Cases

Use Cases

Evaluating a Completed Trade

After closing a stock position, enter your actual buy and sell prices along with commissions to see your exact net profit or loss. Compare the ROI against your target return to evaluate trade performance.

Planning a Sell Target

If you own shares at a known buy price, experiment with different sell prices to see what profit you would realize. Factor in commissions to find the minimum sell price needed to achieve your target return.

Short Selling Analysis

Enable short selling mode to analyze trades where you sold borrowed shares first. The calculator adjusts all figures for short positions so you can accurately assess the profit or loss on bearish bets.

Commission Impact Assessment

Compare the same trade with different commission structures to see how broker fees eat into your profits. Useful when evaluating different brokers or deciding between single large trades versus multiple smaller ones.

Formula

Stock P&L Formulas

Net Profit/Loss

Net P&L=(PsPb)×QCbCs\text{Net P\&L} = (P_s - P_b) \times Q - C_b - C_s
VariableMeaning
P_sSell price per share
P_bBuy price per share
QNumber of shares
C_bBuy commission
C_sSell commission

Return on Investment

ROI=Net P&LPb×Q+Cb×100ROI = \frac{\text{Net P\&L}}{P_b \times Q + C_b} \times 100
VariableMeaning
ROIReturn on Investment percentage

Frequently Asked Questions

?How is stock profit calculated?

Gross profit equals (sell price minus buy price) times the number of shares. Net profit subtracts buy and sell commissions from the gross amount.

?What is breakeven price?

Breakeven price is the minimum sell price needed to cover your purchase cost plus all commissions. Selling above this price means you profit.

?How does short selling work in this calculator?

In short mode, you profit when the buy price is lower than the sell price. The calculator reverses the cost and revenue calculations accordingly.

?Does this include taxes?

No, this calculator computes pre-tax profit and loss. Capital gains taxes vary by country and holding period. Consult a tax advisor for after-tax figures.

?What about dividends?

Dividends are not included in this calculation. If you received dividends while holding the stock, add them to your total return separately.

?Is my trading data private and secure?

Yes. All calculations run entirely in your browser. No trade data is sent to any server, stored, or shared. Your privacy is fully protected.

?Is this tool free to use?

Yes, completely free with no usage limits, no registration required, and no installation needed. Use it for as many trades as you like.

?How is ROI calculated for stock trades?

ROI equals net profit divided by total investment cost (buy price times shares plus buy commission), expressed as a percentage. It measures your return relative to capital deployed.

Help us improve

How do you like this tool?

Every tool on Kitmul is built from real user requests. Your rating and suggestions help us fix bugs, add missing features and build the tools you actually need.

Rate this tool

Tap a star to tell us how useful this tool was for you.

Suggest an improvement or report a bug

Missing a feature? Found a bug? Have an idea? Tell us and we'll look into it.

Related Tools

Recommended Reading

Recommended Books on Stock Trading & Investing

As an Amazon Associate we earn from qualifying purchases.

Boost Your Capabilities

Tools for Stock Trading Analysis

As an Amazon Associate we earn from qualifying purchases.

Newsletter

Get Free Productivity Tips & New Tools First

Join makers and developers who care about privacy. Every issue: new tool drops, productivity hacks, and insider updates — no spam, ever.

Priority access to new tools
Unsubscribe anytime, no questions asked