Stock Trade Profit CalculatorFree online financial calculator — instant results, no sign-up
Calculate realized stock profit after purchase and sale commissions.
Estimates only, based on the inputs and assumptions shown. This is not financial, investment, tax, or legal advice. Prices, rates and local rules may change; crypto scenarios do not predict returns. Confirm important decisions with a qualified professional.
Sign in to save results and favorites.
About the Stock Trade Profit Calculator
The Stock Trade Profit Calculator calculates realized profit from buying and selling the same number of shares, after subtracting purchase and sale commissions. It shows your cost basis, net sale proceeds, and realized profit so you can see how trading fees affect the result.
- Shares (shares)
- The number of shares purchased and then sold, measured in shares, with a default of 100.
- Purchase price per share ($)
- The price paid for each share in dollars, excluding the purchase fee, with a default of $40.
- Sale price per share ($)
- The price received for each share in dollars, before the sale fee, with a default of $48.
- Purchase fee ($)
- The total commission or fee paid for the purchase transaction in dollars, with a default of $5.
- Sale fee ($)
- The total commission or fee paid for the sale transaction in dollars, with a default of $5.
Formula and method
B = N × P_buy + F_buy; S = N × P_sell − F_sell; R = S − B = N × (P_sell − P_buy) − F_buy − F_sell.
- NNumber of shares purchased and sold.
- P_buyPurchase price per share in dollars.
- P_sellSale price per share in dollars.
- F_buyTotal purchase fee in dollars.
- F_sellTotal sale fee in dollars.
- BCost basis in dollars, including the purchase fee.
- SNet sale proceeds in dollars, after deducting the sale fee.
- RRealized profit or loss in dollars, after both fees.
Multiply the share count by the purchase price and add the purchase fee to obtain cost basis. Multiply the same share count by the sale price and subtract the sale fee to obtain net sale proceeds. Subtract cost basis from net sale proceeds. With the default inputs, cost basis = 100 × $40 + $5 = $4,005.00; net sale proceeds = 100 × $48 − $5 = $4,795.00; realized profit = $4,795.00 − $4,005.00 = $790.00.
Worked example
These are the calculator's starting values and the results it actually produces for them.
Inputs
- Shares100 shares
- Purchase price per share40 $
- Sale price per share48 $
- Purchase fee5 $
- Sale fee5 $
Results
- Cost basis$4,005.00
- Net sale proceeds$4,795.00
- Realized profit$790.00
How to use the Stock Trade Profit Calculator
- 1Enter the number of shares purchased and sold; the default is 100 shares.
- 2Enter the purchase price per share; the default is $40.
- 3Enter the sale price per share; the default is $48.
- 4Enter the total purchase and sale fees separately; each defaults to $5, and each should be entered as a transaction total rather than a per-share fee.
- 5Review the calculated cost basis, net sale proceeds, and realized profit; with the defaults, these are $4,005.00, $4,795.00, and $790.00.
Reading your result
Cost basis is the amount spent to acquire the shares, including the purchase fee: $4,005.00 in the default example. Net sale proceeds is the amount received after deducting the sale fee: $4,795.00. Realized profit is the difference between those amounts: $790.00. A positive profit indicates a gain after trading fees, a negative result indicates a loss, and zero means the trade broke even after fees. This result is before taxes.
Limitations
The calculation assumes a straightforward purchase followed by a sale of the same share quantity, with all prices and fees in the same dollar currency. Fees are fixed transaction totals, not percentages or per-share charges. It does not account for taxes, dividends, margin interest, currency conversion, short sales, or other costs not included in the fee inputs. Multiple purchase lots, partial sales, stock splits, and tax-basis adjustments such as wash-sale rules require additional accounting. The displayed cost basis and realized profit are simplified trade calculations, not a determination of reportable taxable gain.
Common questions
Why is the default realized profit $790.00 rather than the gain from the share prices alone?+
The price-only gain is 100 × ($48 − $40) = $800.00. Deducting the $5 purchase fee and $5 sale fee leaves $790.00.
Should I enter commissions per share or for the whole trade?+
Enter the total fee for each transaction. The calculator adds the purchase fee once to cost basis and subtracts the sale fee once from sale proceeds; it does not multiply either fee by the share count.
Can I use this calculator for commission-free stock trades?+
Yes. Enter zero for any fee that was not charged, while including any applicable transaction charges in the corresponding fee field.
Does the $790.00 default profit represent my profit after capital gains tax?+
No. It is profit after the purchase and sale fees but before taxes. Tax treatment depends on factors this calculator does not collect, including holding period, tax jurisdiction, and any required basis adjustments.
Does the calculator save my information?+
Calculations run in your browser. While signed in, inputs and results are automatically recorded in account history; saving a result creates a separate saved record.
Further reading
You might also like
Interest Calculator
Growth of savings with compound interest and regular deposits.
Investment Calculator
Project an investment with monthly contributions.
Finance Calculator
Solve for future value from present value, rate, periods and payment.
Compound Interest Calculator
Compare compounding frequencies and see the effective rate.
Interest Rate Calculator
Find the rate on a loan from amount, payment and term.
Savings Calculator
How savings grow with deposits, interest and tax.
Results are estimates for informational purposes and are not financial, medical or legal advice.