Calculators.Life Calculator
Investing

Stock Profit & Loss Calculator

Input Parameters

Scenarios
The total number of shares bought and sold
$
The purchase price paid per individual share
$
The price per share when selling
Brokerage commission or trading fee incurred when buying
Brokerage commission or trading fee incurred when selling
%
Estimated capital gains tax rate applied to net trading profit

Computed Results

Net Profit / Loss
$303.00
Return on Investment (ROI)3.85%
Total Purchase Cost$7,875.00
Net Sale Proceeds$8,178.00
Total Commissions Paid$897.00
Capital Gains Tax$0.00
Break-Even Sell Price$558.51

The stock calculator helps you determine the estimated net profit or loss from a stock trade. By factoring in the number of shares, purchase and sale prices, brokerage commissions, and capital gains tax, it provides a clear breakdown of your total costs, net proceeds, and return on investment (ROI).

This calculator is for informational purposes only and does not constitute financial, investment, or tax advice.

Practical Use Cases

Understanding the true cost and potential return of a stock trade requires more than just comparing the buy and sell prices. Brokerage commissions and capital gains taxes can significantly impact your final earnings. This calculator is useful for estimating the net outcome of a trade before executing it, evaluating the impact of different fee structures (fixed vs. percentage-based), and determining the exact break-even price needed to cover all associated costs.

How to Use the Calculator

Follow these steps to estimate your stock trade's profitability:

  1. Enter the Number of Shares: Input the total quantity of shares you bought and sold.
  2. Input Prices: Provide the purchase price paid per share and the expected or actual sell price per share.
  3. Specify Commissions: Enter the brokerage fees for buying and selling. You can select whether these fees are a fixed amount or a percentage of the transaction value.
  4. Apply Capital Gains Tax: If applicable, enter your estimated capital gains tax rate. This percentage is applied only to your net trading profit.
  5. Review the Results: The calculator will display your estimated net profit or loss, ROI, total purchase cost, net sale proceeds, total commissions paid, capital gains tax, and the break-even sell price.

Formula & Explanation

The calculator determines your net profit and ROI using a series of calculations to account for all costs and revenues.

Total Purchase Cost

First, the gross purchase amount is calculated, and the buy commission is added.

Gross Purchase = Shares × Purchase Price
Total Cost = Gross Purchase + Buy Commission

Net Sale Proceeds

Next, the gross sale amount is calculated, and the sell commission is deducted.

Gross Sale = Shares × Sell Price
Net Proceeds = Gross Sale − Sell Commission

Net Profit and ROI

The pre-tax profit is the difference between net proceeds and total cost. If the trade is profitable, the capital gains tax is subtracted to find the net profit.

Pre-Tax Profit = Net Proceeds − Total Cost
Capital Gains Tax = Pre-Tax Profit × Tax Rate
Net Profit = Pre-Tax Profit − Capital Gains Tax
ROI = (Net Profit ÷ Total Cost) × 100

Break-Even Sell Price

The break-even price is the exact price per share you must sell at to cover the total purchase cost and the sell commission, resulting in a net profit of zero.

Verified Scenario Walkthroughs

Here are examples of how different variables affect the outcome of a trade.

Small Trade with Fixed Fees

If you buy 5 shares at $20 each and sell them at $25 each, with a fixed $2 commission for both buying and selling, and a 0% tax rate:

Large Volume Trade with Percentage Fees

If you trade 1,000 shares, buying at $150 and selling at $165, with a 0.5% commission on both sides and a 15% tax rate:

Loss Scenario with Tax Impact

If you buy 50 shares at $100 and sell at $90, with fixed $10 commissions and a 20% tax rate:

Mixed Fee Types and High Tax

If you buy 200 shares at $50 and sell at $75, with a fixed $15 buy commission, a 1% sell commission, and a 35% tax rate:

Inputs & Outputs

FieldTypeDescription
Number of SharesInputThe total number of shares bought and sold.
Purchase Price (per share)InputThe purchase price paid per individual share.
Sell Price (per share)InputThe price per share when selling.
Buy CommissionInputBrokerage commission or trading fee incurred when buying.
Sell CommissionInputBrokerage commission or trading fee incurred when selling.
Capital Gains Tax RateInputEstimated capital gains tax rate applied to net trading profit.
Net Profit / LossOutputThe final estimated profit or loss after all fees and taxes.
Return on Investment (ROI)OutputThe percentage return on the total purchase cost.
Total Purchase CostOutputThe gross purchase amount plus buy commissions.
Net Sale ProceedsOutputThe gross sale amount minus sell commissions.
Total Commissions PaidOutputThe sum of buy and sell commissions.
Capital Gains TaxOutputThe estimated tax amount deducted from pre-tax profit.
Break-Even Sell PriceOutputThe sell price per share required to exactly cover all costs.

Frequently Asked Questions

How is the break-even price calculated?

The break-even price is calculated by determining the sell price per share needed to cover the total purchase cost plus the sell commission. If the sell commission is a percentage, the formula divides the total cost by the number of shares multiplied by one minus the commission rate.

Does the calculator apply capital gains tax to losses?

No. The calculator only applies the capital gains tax rate if the pre-tax profit is greater than zero.

Author portrait
About the Author
Arnab Biswas

Calculator developer and SEO strategist who builds practical online calculators and tests calculation logic, input handling, and expected results using real-world scenarios.