Stock Gain Calculator: See Your Profit or Loss Instantly

Use this free stock gain calculator to find out exactly how much money you made or lost on any stock trade. Enter your buy price, sell price, number of shares, and any fees. You will see your total profit or loss in seconds.

📈 Stock Gain Calculator
The price you paid for each share.
The price you sold (or plan to sell) each share.
How many shares you bought.
Optional. Buy + sell commissions combined.
Please fill in buy price, sell price, and number of shares.
Your Results
Net Profit / Loss
Total Cost
Total Revenue
Gross Gain / Loss
Total Fees
📅
Annualized Return (CAGR)

Ready to put your gains to work? Trade crypto with no KYC required on Bitunix.

How to Use the Stock Gain Calculator

Using this stock gain calculator is simple. Enter four things: the price you paid per share, the price you sold at, how many shares you had, and any fees you paid. Click Calculate My Gain and you will see your profit or loss right away.

Want to know your annualized return? Toggle on the date option and enter your buy and sell dates. The calculator will show your CAGR (Compound Annual Growth Rate). That tells you how fast your investment grew each year.

What Each Number Means

Here is a quick breakdown of each result the calculator shows you.

Total Cost

This is the total money you put in. It equals your buy price times the number of shares. For example, if you bought 100 shares at $50 each, your total cost is $5,000.

Total Revenue

This is the total money you got back. It equals your sell price times the number of shares. If you sold those 100 shares at $75, your total revenue is $7,500.

Gross Gain or Loss

Gross gain is your profit before fees. It is simply total revenue minus total cost. In the example above, that is $7,500 minus $5,000, which equals $2,500.

Net Profit After Fees

Net profit is what you actually keep. It takes your gross gain and subtracts any commissions or trading fees. If your broker charged $10 total, your net profit would be $2,490.

Return on Investment (ROI)

ROI shows your gain as a percentage of what you invested. A 50% ROI means you made 50 cents for every dollar you put in. It is the fastest way to compare one trade to another.

Annualized Return (CAGR)

CAGR stands for Compound Annual Growth Rate. It shows how much your investment grew per year on average. A 50% total return over 5 years is very different from a 50% return over 6 months. CAGR lets you compare them fairly.

According to Investopedia, CAGR is one of the most useful ways to measure investment growth because it smooths out the ups and downs over time.

Why Fees Matter More Than You Think

Fees seem small. But they add up fast. A $10 commission on a $500 trade is 2% of your money gone before you even start. On a $50,000 trade, that same $10 is almost nothing.

Many brokers today offer zero-commission trades. But some charge fees for options, mutual funds, or certain ETFs. Always check before you buy. Small fees on repeated trades can eat thousands of dollars over time.

This calculator lets you add your total fees so you see your real profit, not just the gross number.

How to Calculate Stock Gain By Hand

You do not need the stock gain calculator to do this math. Here is the formula:

Gross Gain = (Sell Price – Buy Price) x Number of Shares

Net Profit = Gross Gain – Total Fees

ROI % = (Net Profit / Total Cost) x 100

Example: You buy 200 shares at $30. You sell them at $45. You paid $15 in fees.

  • Total Cost: 200 x $30 = $6,000
  • Total Revenue: 200 x $45 = $9,000
  • Gross Gain: $9,000 – $6,000 = $3,000
  • Net Profit: $3,000 – $15 = $2,985
  • ROI: ($2,985 / $6,000) x 100 = 49.75%

Easy enough to do on paper. But when you are making many trades, a calculator saves time and prevents mistakes.

What Is a Good Return on a Stock?

The S&P 500 has returned about 10% per year on average over the long term. That is the standard many investors use as a benchmark.

If your stock returned 10% or more per year, you beat the average. If it returned less, a simple index fund might have done better for you.

But short-term returns can be wild. Stocks can gain 50% in a month or lose 40% in a week. That is why most experts suggest holding for the long term and not chasing quick wins.

Tax on Stock Gains

This calculator shows your pre-tax profit. In the US, stock gains are taxed. The rate depends on how long you held the stock.

  • Short-term gains: Held less than 1 year. Taxed as ordinary income (10% to 37%).
  • Long-term gains: Held more than 1 year. Taxed at 0%, 15%, or 20% depending on your income.

Holding a stock for more than one year can make a big difference in your tax bill. A $10,000 profit taxed at 37% leaves you $6,300. That same profit taxed at 15% leaves you $8,500. That is $2,200 more just by waiting a few extra months.

Always talk to a tax professional about your specific situation. This calculator is for planning purposes only.

When Should You Sell a Stock?

Knowing your stock gain is only part of the picture. Knowing when to sell is just as important. Here are a few common reasons investors sell.

You Hit Your Target Price

Many investors set a target price before they buy. When the stock reaches that price, they sell. This removes emotion from the decision. You made a plan and you stuck to it.

The Company Changed

Sometimes the reason you bought a stock no longer applies. A key executive left. The company changed its business model. A competitor arrived. If the story changed, it is okay to exit.

You Need the Money

Life happens. If you need cash for something important, selling a stock is fine. Use this calculator to see exactly what you will walk away with after fees.

Rebalancing Your Portfolio

If one stock grew a lot, it might now be too large a part of your portfolio. Selling some shares to rebalance is a smart, low-drama reason to take gains.

More Tools to Help You Invest Smarter

Once you know your stock gain, you might want to plan your next move. These free calculators can help:

  • DCA Calculator: See how investing a fixed amount every month can grow your portfolio over time, no matter what the market does.
  • Share Profit Calculator: Calculate profit on any stock position with more detailed breakdowns including partial sales.

Frequently Asked Questions

Subtract your buy price from your sell price, then multiply by the number of shares. That gives you your gross gain. Subtract any fees to get your net profit. Use the stock gain calculator above to do this in seconds.

Gross gain is your profit before fees. Net profit is what you actually keep after subtracting commissions and trading fees. Always look at net profit because that is the real money in your pocket.

CAGR stands for Compound Annual Growth Rate. It shows how much your investment grew per year on average. It is useful for comparing investments held for different lengths of time. Toggle on the date fields in the calculator above to see your CAGR.

No. This calculator shows your pre-tax gain. In the US, stock profits are taxed as either short-term or long-term capital gains depending on how long you held the stock. Consult a tax professional for advice specific to your situation.

Yes. The math is the same for any asset you buy and sell. Enter the buy price, sell price, number of units or shares, and any fees. The calculator will show your gain or loss just the same.

If your sell price is lower than your buy price, the calculator will show a negative number in red. That is your loss. Losses can sometimes offset gains for tax purposes. This is called tax-loss harvesting.