Stock Profit Calculator
Show the math
What Your Result Means
- Total Cost Basis: The total amount you invested, including the purchase price of all shares plus any buy-side commission. This is what the IRS uses to determine your taxable gain.
- Gross Proceeds: The total sale revenue before deducting sell-side commissions — the raw value of your shares at the sell price.
- Net Proceeds: What you actually receive after the sell commission is deducted from gross proceeds.
- Total Gain/Loss: Net proceeds minus cost basis. A positive number is a realized gain; a negative number is a realized loss.
- Return %: Your gain or loss expressed as a percentage of cost basis. This tells you how efficiently your invested capital performed, independent of the dollar amount.
How This Calculator Works
You enter the buy price per share, sell price per share, number of shares, and any buy and sell commissions. The tool computes cost basis as (buy price × shares) + buy commission, gross proceeds as sell price × shares, and net proceeds after the sell commission. Gain or loss is net proceeds minus cost basis, and return is that gain divided by cost basis. It does not account for dividends, taxes, or holding period.
Quick Questions
Does this include taxes on my gain?
No. This shows pre-tax realized gain only. Short-term gains (held under one year) are taxed as ordinary income; long-term gains (held over one year) get preferential rates of 0%, 15%, or 20% depending on your income. Consult your 1099-B and a tax professional.
What about the wash-sale rule?
If you sell at a loss and repurchase the same or a substantially identical security within 30 days before or after, the IRS disallows the loss deduction. Your broker tracks this and reports it on your 1099-B.
Should I enter commissions if my broker is commission-free?
If your broker charges zero commissions (common with most major U.S. brokers since 2019), leave the commission fields at zero. The calculator still works — cost basis will simply be buy price times shares.
Can I use this for fractional shares?
Yes. Enter the exact number of shares including decimals (e.g., 2.5 shares). The math works the same way for fractional and whole-share trades.
Does this account for dividends received?
No. This calculator measures price-based return only. If you received dividends during the holding period, your total return is higher than what this tool shows. Add dividend income separately for a complete picture.
Sources
- IRS Publication 550 — Investment Income and Expenses (cost basis, capital gains rules)
- SEC Investor.gov — Stocks (stock investing fundamentals)
- IRS Topic 409 — Capital Gains and Losses (tax rates for short- and long-term gains)
Method & review
Estimate only. Results reflect your inputs and standard formulas — they are not financial, tax, legal, health, or investment advice. Verify important decisions with a qualified professional.