Stock Profit Calculator
Calculate profit, return and net proceeds on a share trade after fees and commissions.
Last updated · View algorithm, constants and default inputs (JSON)
About this calculator
Calculate net proceeds and profit or loss from a share purchase and sale, less the entered fees. This is arithmetic, not investment advice; it excludes taxes and any costs not entered.
Worked example
calculated with the default values below
Buy price per share 50 $ · Sell price per share 60 $ · Number of shares 100 shares · Total fees 10 $ Net profit 990.00 $ · Return 19.80 % · Net proceeds 5,990.00 $ · Cost basis 5,000.00 $
General background references
Disclaimer
These calculators give estimates for general information only. They are not financial, tax or investment advice and do not take your personal circumstances into account. Before borrowing, investing or filing, confirm the numbers with a qualified adviser in your jurisdiction.
Implementation source
This record describes the implementation used by this page. It is not independent validation. External references, when available, support only the stated formula or definition; estimates and custom rules retain their own assumptions.
Formula and variables
profit = (p₂n − f) − p₁n; ROI = profit ÷ (p₁n) × 100
- p₁
- Buy price
- p₂
- Sell price
- n
- Shares
- f
- Fees
Cost basis = buy price × shares; net proceeds = sell price × shares − fees; profit = proceeds − cost basis; return = profit ÷ cost basis. Return is undefined when cost basis is zero.
Frequently asked questions
Why is return blank when cost basis is zero?
Return percentage divides profit by cost basis. When the cost basis is zero, that percentage is undefined, so it is left blank.