Skip to content

Stock Profit Calculator

Profit is the sale price minus the buy price, times the shares, minus the buy commission and the sell commission. Buying at 10 and selling at 15, for 100 shares and no commission, is a profit of 500. Each commission can be a flat fee or a percentage. The page does not look up a quote.

Result

Enter prices, commissions, and shares

How to Use

  1. 1 Enter the buy price, the sale price, and the number of shares.
  2. 2 Choose a flat fee or a percentage for the buy commission and the sell commission.
  3. 3 Read the profit. 10, 15, 100 shares, and commissions of 0 is 500.

Example Output

  • Buy 10, sell 15, 100 shares, and flat commissions of 0 is 500.
  • The same trade with a flat buy commission of 20 and a flat sell commission of 0 is 480.

About This Tool

A flat fee is subtracted once. A percentage is the price times the shares times the percent, divided by 100. A negative result is a loss.

Using the Stock Profit Calculator

This page computes a profit from the prices, the shares, and two commissions you type. Profit equals the sale price minus the buy price, multiplied by the shares, minus the buy commission and the sell commission. A buy price of 10, a sale price of 15, 100 shares, and commissions of 0 is a profit of 500. The price difference is 5. Before commissions, 5 times 100 is 500. Subtracting commissions of 0 leaves 500. The same trade with a flat buy commission of 20 and a flat sell commission of 0 is 480, because 500 minus 20 is 480. The page shows the price difference, the amount before commissions, each commission, and the profit.

Each commission has its own control. Flat fee subtracts the amount you type, once. Percentage multiplies the price by the shares by the percent and divides by 100. A buy percentage of 2 on this trade is 20, because 10 times 100 times 2, divided by 100, is 20. A sell percentage of 2 is 30, because 15 times 100 times 2, divided by 100, is 30. Those two percentages together change 500 to 450. A blank commission amount is treated as 0. A blank price is not.

The page does not look up a quote. 10 and 15 are the prices you entered, not prices fetched from a market. If the sale price is below the buy price, the price difference is negative, the amount before fees is negative when the shares are positive, and the profit is negative after fees are subtracted. A negative result is a loss. Buy 15, sell 10, 100 shares, and a fee of 0 is a profit of -500. That loss is the formula applied to those inputs. It is not a market report.

The buy price must be greater than 0, and the shares must be greater than 0. The sale price may be 0, and the fees may be 0. Each of the four values must be at most 100000000000. A sale price of 0 with a buy price of 10, 100 shares, and a fee of 0 is a profit of -1000. A fee of 0 leaves the profit equal to the price difference times the shares. A blank field is not a number the formula can use. The page will not invent a quote to fill it.

Keep the four inputs with the profit. A note that says only 500 can be this trade with no fee, or another set of prices, shares, and fees that happens to land on 500. The check for this page is specific: buy 10, sell 15, 100 shares, and fee 0 is 500, and fee 20 on that same trade is 480. Run those two versions when you want to see the fee subtracted after the multiplication.

What the Profit Figure Includes

The profit is one number built in three steps. First the sale price minus the buy price is the price difference. For 15 and 10, that difference is 5. Then the difference times the shares is the amount before fees. For 100 shares, 5 times 100 is 500. Then the fees are subtracted. A fee of 0 leaves 500. A fee of 20 leaves 480. The result lines follow that order: price difference, before fees, fees, and profit. The headline is the profit, after fees.

A positive profit means the sale price was high enough, after the shares and the fees, to finish above zero. A negative result is a loss. The sign comes from the arithmetic. It is not a rating of the trade, and it is not a quote. Buy 10 and sell 15 with 100 shares is a gain before fees only because 15 is greater than 10. Change the sale price to 10 and the price difference is 0. With a fee of 0 the profit is 0. With a fee of 20 the profit is -20, which is a loss equal to the fee.

How a Fee of 20 Changes 500

Enter a buy price of 10, a sale price of 15, 100 shares, and commissions of 0. The price difference is 5, the amount before commissions is 500, and the profit is 500. Change only the buy commission to a flat fee of 20 and leave the sell commission at 0. The price difference is still 5, and the amount before commissions is still 500, because each commission is applied after the multiplication. The profit is 480. Run both versions again. 500 and 480 should repeat. The page does not look up a quote to replace 10 or 15, and it does not refuse a sale price of 0. The buy price and the shares must each be greater than 0. A flat commission must be at most 100000000000. A percentage must be at most 100.

Return on investment is a different ratio. The ROI Calculator subtracts the cost from the gain and divides by the cost. A gain of 150 and a cost of 100 is 0.5, or 50 percent. It does not multiply a price difference by a share count, and it does not return 500 for the trade on this page. Use it when you want that ratio. Use this page when you want sale minus buy, times shares, minus fees.

What the Page Does Not Look Up

The page does not look up a quote, a split, a dividend, or a currency. The profit of 500 is (15 minus 10) times 100 minus 0. The profit of 480 is that same product minus a flat buy commission of 20, with the sell commission left at 0. A percentage is not a second copy of the flat fee. It is the price times the shares times the percent, divided by 100, and that dollar amount is what gets subtracted. A flat fee is not multiplied by the shares. You do not add the two commissions together before typing them. Each one has its own amount and its own choice of flat fee or percentage.

The page does not decide that a loss should be shown as a positive number with a label. A negative result is a loss, and the number keeps its sign. Buy 15, sell 10, 100 shares, and commissions of 0 is -500. A flat buy commission of 20 on that losing trade, with the sell commission at 0, is -520. Nothing in the headline is a recommendation to buy or sell. The prices are the ones you typed.

The Trade That Finishes at 500

Enter 10 for the buy price, 15 for the sale price, 100 for the shares, and 0 for the fees. Read the price difference of 5, the amount before fees of 500, the fees of 0, and the profit of 500. Then enter 20 for the fees and leave the other three numbers alone. The price difference stays 5, the amount before fees stays 500, and the profit is 480. Enter a sale price of 0 with the buy price still 10, the shares still 100, and the fees at 0. The price difference is -10, and the profit is -1000. That is a loss, and it is allowed because the sale price may be 0.

A comparison of two numbers is a different calculation. The Percentage Difference Calculator divides the absolute difference of two values by the average of their absolute values, then multiplies by 100. It does not multiply by a share count, and it does not subtract a fee to produce 480. Use it when you want that comparison of two values. Use this page when the profit depends on shares and fees.

Prices, Shares, and the Upper Bound

The buy price must be greater than 0 and at most 100000000000. The shares must be greater than 0 and at most 100000000000. A buy price of 0 is rejected. A share count of 0 is rejected. The sale price must be at least 0 and at most 100000000000, so 0 is allowed and a negative sale price is not. A flat commission must be at least 0 and at most 100000000000. A percentage must be at least 0 and at most 100. A blank commission amount is treated as 0. A blank price or a blank share count is rejected. A negative commission is not accepted.

Mistakes That Hide a Loss

The usual miss is to subtract the fee before multiplying by the shares. The fee comes last. On the sample trade the difference is 5, the product is 500, and only then does a fee of 20 produce 480. Subtracting 20 from the price difference first would describe a different formula, and this page does not do that. Another miss is to treat a negative profit as an error. A negative result is a loss. Buy 15, sell 10, 100 shares, and a fee of 0 is -500, which is the formula working. A third miss is to expect the page to look up a quote when the buy field is blank. The page does not look up a quote. A fourth miss is to enter a share count of 0 and expect the profit to equal the price difference. Shares must be greater than 0.

A property rate is a different division. The Cap Rate Calculator divides net operating income by property value and multiplies by 100. Income of 12000 on a value of 200000 is a cap rate of 6 percent. It does not return 500 for a stock trade, and it does not subtract a trading fee from a share product. Use it for that rate. Use this page for the share formula.

Recording the Four Inputs

Write the buy price, the sale price, the shares, the fees, and the profit in one note. For the first sample the note is buy 10, sell 15, shares 100, fees 0, profit 500. For the second sample change only the fees to 20 and the profit to 480. Include the price difference and the amount before fees if someone else will check the multiplication. Those lines are 5 and 500 for both samples. The fee is the only input that changes between 500 and 480.

Rebuilding 500 and 480

Enter buy 10, sell 15, shares 100, and fees 0. Confirm the price difference is 5, the amount before fees is 500, and the profit is 500. Change the fees to 20. Confirm the price difference is still 5, the amount before fees is still 500, and the profit is 480. Enter buy 15, sell 10, shares 100, and fees 0. Confirm the profit is -500, a loss. Enter a sale price of 0 with buy 10, shares 100, and fees 0. Confirm the profit is -1000. Enter a buy price of 0 and confirm it is rejected. Enter a share count of 0 and confirm it is rejected. Enter a value above 100000000000 and confirm it is rejected.

Plain arithmetic is available on another page when you want to multiply or subtract one step at a time. The 4 Function Calculator applies the operations you enter there. It does not label a price difference, a share count, and a fee as a stock profit, and it does not look up a quote. Use it to check a single product or a single subtraction. Use this page when you want (sell minus buy) times shares minus fees in one result.

Using a Negative Result

A negative result is a loss. It means the fees were larger than the share product, or the share product itself was negative because the sale price was below the buy price. Buy 15, sell 10, 100 shares, and fee 0 is -500. The same prices with a fee of 20 is -520. A sale price of 0 is allowed and, with a buy price above 0 and shares above 0, produces a loss before any fee is added. A fee of 0 does not turn a negative price difference into a profit. It only declines to subtract anything further.

Checking the Arithmetic Before You Keep It

Start with the known trade. Buy 10, sell 15, 100 shares, and fee 0 should be a price difference of 5, an amount before fees of 500, and a profit of 500. The fee of 20 should change only the last step, from 500 to 480. If 20 is subtracted from 5 before the shares are applied, the page is not using this formula. Then try a sale below the buy price and confirm the sign is negative. A loss should remain a negative number. Confirm a share count of 0 is rejected and a fee of 0 is accepted. The page does not look up a quote for any of these checks.

A markdown on a price is a different percent. The Discount Calculator multiplies a price by a percent and divides by 100. A price of 80 at 25 percent is a discount of 20 and a sale price of 60. It does not multiply a share count, and it does not return 500. Use it when you want that markdown. Use this page when profit depends on a buy price, a sale price, shares, and fees.

Frequently Asked Questions

What is the profit on the sample trade with no commission?

Buy 10, sell 15, 100 shares, and commissions of 0 is a profit of 500. The price difference is 5, and the amount before commissions is 500.

What does a flat buy commission of 20 do to that trade?

With the sell commission at 0, the profit is 480. The price difference stays 5 and the amount before commissions stays 500. The buy commission is subtracted after the shares are multiplied.

What is the formula?

Profit equals the sale price minus the buy price, times the shares, minus the buy commission and the sell commission. A flat fee is the amount you type. A percentage is the price times the shares times the percent, divided by 100.

Does the page look up a quote?

No. The buy price and the sale price are the numbers you type. 10 and 15 are not fetched from a market.

May the sale price or the fees be 0?

Yes. A sale price of 0 and fees of 0 are allowed. With buy 10, shares 100, and fees 0, a sale price of 0 is a profit of -1000.

May the buy price or the shares be 0?

No. The buy price must be greater than 0, and the shares must be greater than 0. Each input must also be at most 100000000000.

Is a negative profit an error?

No. A negative result is a loss. Buy 15, sell 10, 100 shares, and a fee of 0 is -500.

How does a percentage commission work?

The commission is the price times the shares times the percent, divided by 100. On the sample trade, a buy percentage of 2 is 20 and a sell percentage of 2 is 30, so the profit is 450.

What is the largest input?

Each of the buy price, the sale price, the shares, and the fees must be at most 100000000000. A larger value is rejected.

Why keep all four inputs with the profit?

500 can be produced by more than one combination. The check for this page is buy 10, sell 15, 100 shares, and fee 0. Fee 20 on that trade is 480.