Stock Profit Calculator
I built this tool to help you instantly calculate your stock trading profits and losses. Know exactly how much you made (or lost) on any trade.
Stock Profit Calculator
Instantly calculate your stock trading profits and losses.
How This is Calculated
Stock Profit Calculator in 3 Simple Steps
I've designed this process to be as intuitive as possible. Here's how I use it to analyze my trades.
1. Input Trade Data
Enter your buy price, sell price, number of shares, and any trading commissions. Be as accurate as possible for the best results.
2. Calculate
My calculator instantly crunches the numbers, showing you your total cost, revenue, and profit or loss amount.
3. Analyze Results
See your profit/loss percentage, break-even price, and visual chart. Use these insights to evaluate your trade performance.
Why I Built This Stock Profit Calculator
I've been trading stocks for years, and one thing that always frustrated me was trying to quickly calculate my actual profit or loss on a trade. Sure, my brokerage account shows it, but sometimes I want to run the numbers myself—before I even place a trade.
This calculator is designed for real-world trading. It doesn't just subtract buy price from sell price. It accounts for trading commissions, which can eat into your profits—especially on smaller trades. When you're trading 50 shares at $10 each, a $5 commission on each side matters. That's $10 in fees on a $500 investment—2% right off the top.
I use this calculator constantly when I'm:
- Planning a trade: "If I buy at $50 and sell at $55, how much will I actually make after fees?"
- Evaluating past performance: "I thought I made $500 on that trade, but what was my real return percentage?"
- Setting break-even targets: "What price do I need to hit just to cover my costs?"
- Comparing brokers: "How much will higher commissions cost me over time?"
How to Calculate Stock Profit: The Complete Formula
The math behind stock profits is straightforward, but you need to be careful not to miss any costs. Here's the exact formula I use:
Total Cost = (Buy Price × Shares) + Buy Commission
Total Revenue = (Sell Price × Shares) − Sell Commission
Profit/Loss = Total Revenue − Total Cost
Notice that the sell commission is subtracted from revenue, not added to cost. Mathematically it works out the same, but this is how I think about it: I receive money from selling shares, but the broker takes their cut before it hits my account.
Here's a real example: Let's say I bought 100 shares of XYZ at $50, with a $5 commission. Later, I sold them at $75, with another $5 commission.
- Total Cost: ($50 × 100) + $5 = $5,005
- Total Revenue: ($75 × 100) − $5 = $7,495
- Profit: $7,495 − $5,005 = $2,490
Understanding Profit/Loss Percentage
Dollar amounts are nice, but percentage return is what really matters. A $500 profit means something very different if you invested $5,000 versus $50,000.
Profit % = (Profit / Total Cost) × 100
In our example above: ($2,490 / $5,005) × 100 = 49.75%
That's a fantastic return! But here's why percentage matters: if I had only made $500 profit on that same $5,005 investment, my return would be just 9.99%. Same dollar amount as a completely different trade might be great or terrible depending on how much capital I used.
I generally look for:
- Under 10%: Disappointing, unless I held for a very short period
- 10-25%: Solid return, I'm happy with this
- 25-50%: Excellent trade, this is what I aim for
- Over 50%: Home run! Time to consider taking profits
The Impact of Trading Fees and Commissions
I can't stress this enough: commissions matter. In the days of $0 commission trades at most brokers, it's easy to forget that fees still exist. But not everyone has access to zero-commission trading, and even when you do, there are hidden costs.
Here's what I've learned about fees:
- Small trades get crushed by fees: If I buy 10 shares at $10 with a $5 commission, that's 5% in fees immediately. The stock needs to rise 10% just for me to break even (5% to cover buy commission, 5% to cover sell commission).
- Per-share fees add up fast: Some brokers charge "per share" fees for active traders or penny stocks. 1,000 shares at $0.01 per share = $10 each way. That's $20 in fees on a single trade.
- Option assignments/exercises have fees: If you trade options and get assigned, you might pay unexpected fees on the resulting stock transaction.
- SEC and FINRA fees: These tiny fees on stock sales are automatically deducted. You might not notice them, but they exist (usually a few cents per trade).
My calculator includes commission inputs because realistic profit calculation means accounting for every cost. When I'm evaluating a potential trade, I always assume the worst-case fee scenario to be safe.
Break-Even Price: What You Need to Know
The break-even price is the price at which I can sell my shares and walk away with neither a profit nor a loss. It's higher than my buy price because it needs to cover both buy and sell commissions.
Break-Even Price = Buy Price + (Buy Commission / Shares) + (Sell Commission / Shares)
In our example: $50 + ($5 / 100) + ($5 / 100) = $50.10
That means if I sell at exactly $50.10 per share, I make zero profit. I need to sell above that price to make money. On the flip side, if I'm worried about a stock dropping, I know I have some cushion—I can sell at $49.50 and still "only" lose 1%, not the 2% I'd lose if I ignored commissions.
I use break-even analysis to:
- Set stop-loss levels: If my break-even is $50.10, I might set a stop at $48 (about a 4% loss) to limit downside.
- Calculate profit targets: If I want a 20% return and my break-even is $50.10, I need to sell at $60.12.
- Evaluate trade quality: If the break-even is way above my buy price due to high fees, I might skip the trade entirely.
My Rules for Using This Calculator
After years of trading, I've developed some rules around tracking my profits:
- Always calculate before trading: I plug in the numbers before I buy. If the potential return doesn't justify the risk, I skip it.
- Be conservative with fees: If I'm not sure what the commission will be, I overestimate. Better to be pleasantly surprised than disappointed.
- Track annual returns, not just individual trades: A 50% gain on one trade doesn't mean much if I lost 40% on another. I calculate my overall portfolio return yearly.
- Consider holding period: A 20% return in 6 months is amazing. A 20% return over 5 years is mediocre (about 3.7% annualized).
- Don't forget taxes: Short-term gains (held under 1 year) are taxed at my regular income rate. Long-term gains (held over 1 year) get the lower capital gains rate. This calculator shows pre-tax returns—I factor in taxes separately.
- Compare to benchmarks: Did I beat the S&P 500? If the market returned 15% and I made 12% after fees, I actually underperformed.
Common Mistakes Traders Make
I've made plenty of mistakes over the years. Here are the most common ones I see traders make when calculating profits:
- Ignoring commissions: Thinking you made $500 when you actually made $490 after fees. Small trades get hit hardest.
- Forgetting about dividends: If a stock paid dividends while you owned it, that's part of your return. Add it to your profit calculation.
- Confusing paper gains with real gains: Your portfolio might show +$10,000, but you haven't actually made anything until you sell. (And once you sell, you'll owe taxes.)
- Not annualizing returns: A 10% return sounds good until you realize you held the stock for 3 years—that's only about 3.2% annualized, barely beating a savings account.
- Only looking at winners: We love to brag about our 50% gains but conveniently forget about the 30% loss. Calculate your aggregate return across all trades.
- Chasing high returns without considering risk: A 100% return is worthless if I had to take massive risk to get it. Consistent 15-20% returns with manageable risk beats a roller coaster any day.
When to Take Your Profits
One question I get all the time is: "When should I sell?" There's no perfect answer, but here's my framework:
- When the thesis is broken: I bought for a reason. If that reason is no longer valid (bad earnings, management change, industry shift), I sell regardless of profit or loss.
- When I hit my target: Before buying, I set a profit target. If I reach it, I take at least some profits off the table. Greed has cost me more than fear ever has.
- When the money is better elsewhere: If I'm up 30% but find another opportunity with a better risk-reward profile, I might sell to free up capital.
- When tax considerations matter: If I'm close to the one-year mark for long-term capital gains treatment, I might wait a few weeks before selling to save on taxes.
- When I need the money: Life happens. Sometimes I sell because I need cash for something else. It's not ideal, but it's reality.
The key is to have rules in advance. I decide when I'll sell before I buy. This removes emotion from the equation and keeps me from making impulsive decisions.
More Popular Calculators
Check out these other powerful tools to help you optimize your investment strategy.
Frequently Asked Questions
How is stock profit calculated?
Stock profit is calculated by subtracting your total cost from your total revenue. Total cost includes the share purchase price plus any commissions. Total revenue is what you receive from selling shares minus any sell commissions. The formula is: Profit = (Sell Price × Shares - Sell Commission) - (Buy Price × Shares + Buy Commission). This calculator handles all the math for you automatically.
What is a good profit percentage on stocks?
I generally aim for 25-50% returns on my individual stock picks. Anything under 10% is disappointing unless held for a very short period. 10-25% is a solid return. Over 50% is a home run and I usually consider taking some profits at that level. However, what matters most is your return relative to risk and the overall market. A 20% return when the S&P 500 did 25% means you underperformed.
How do I calculate break-even price?
Break-even price is the price at which you can sell your shares and neither make nor lose money. It accounts for both buy and sell commissions. The formula is: Break-Even = Buy Price + (Buy Commission / Shares) + (Sell Commission / Shares). For example, if you bought at $50 with 100 shares and $5 commissions on both ends, your break-even is $50.10. My calculator shows this automatically.
Do trading fees significantly affect my profits?
Absolutely. Fees can devastate small trades. If you buy 10 shares at $10 with a $5 commission, you're paying 5% in fees upfront. You need a 10% gain just to break even after accounting for sell commissions too. On larger trades, fees matter less percentage-wise, but they still add up over time. Always factor in commissions when evaluating potential trades.
What if I hold a stock for less than a year?
If you hold a stock for less than a year before selling, any profit is considered a 'short-term capital gain' and is taxed at your regular income tax rate. This can be significantly higher than the long-term capital gains rate (which applies to holdings over 1 year). This calculator shows pre-tax returns, so remember to factor in taxes based on your holding period.
How does this calculator handle fractional shares?
The calculator works perfectly with fractional shares. Just enter the exact number of shares you own, including decimals. For example, if you have 5.375 shares from a dividend reinvestment plan, enter 5.375 in the shares field. All calculations—cost, revenue, profit, break-even—will be accurate for fractional shares.
Can I use this for options trading?
No, this calculator is designed for stock trading, not options. Options have completely different math involving strike prices, premiums, expiration dates, and the multi-leg nature of many options strategies. For options, you'd need a specialized options profit/loss calculator that accounts for the Greeks (delta, theta, vega, gamma) and time decay.
What's the difference between realized and unrealized profit?
Unrealized profit (also called 'paper gain') is the profit you would have if you sold right now, based on current prices. It changes constantly as the stock price moves. Realized profit is the actual profit or loss you lock in when you close a position by selling. Only realized profits matter for tax purposes. This calculator shows realized profit based on actual sell prices.
How accurate are these calculations?
The calculations are mathematically precise based on the inputs you provide. However, real-world accuracy depends entirely on your data entry. If you forget to include commissions, enter the wrong share count, or use incorrect prices, the results will be wrong. I recommend double-checking your inputs against your actual brokerage statements. The calculator itself doesn't make mistakes—it only works with what you give it.
Why did my broker show a different number?
Brokers might calculate returns differently for a few reasons: (1) They might be showing return since purchase versus since a specific date, (2) They could be including or excluding dividends in the calculation, (3) There might be corporate actions like splits or spinoffs affecting the cost basis, (4) They might be showing after-tax or pre-tax returns differently, (5) Some brokers use FIFO, LIFO, or specific identification methods for cost basis when you've bought shares at different times. If there's a discrepancy, check your trade confirmation statements.
Know Your True Trading Profits
Stop guessing. Use the calculator above to see exactly how much you're making (or losing) on every trade.
Calculate Now