Stock Profit Calculator
Calculate your stock investment profits including all costs and taxes.
Trade Details
Net Profit
$2,201.50
43.99% total return
Breakdown
Understanding Stock Profit Calculations
A stock profit calculator helps you determine your actual gains or losses from stock trades, accounting for purchase price, sale price, fees, and other costs. Understanding these calculations is essential for tracking investment performance and tax planning.
Key components of stock profit:
- Cost basis: Original purchase price plus fees
- Sale proceeds: Selling price minus fees
- Capital gain/loss: Difference between proceeds and cost basis
- Dividends: Cash payments received while holding
- Total return: Capital gain plus dividends
Types of returns:
- Absolute return: Total dollar profit or loss
- Percentage return (ROI): Profit as percentage of investment
- Annualized return: Return expressed as yearly rate
Stock Profit Formulas
Essential calculations for stock trading:
Stock Return Formulas
Where:
- ROI= (Profit / Total Cost) × 100%
- Total Return= Capital Gain + Dividends
- Annualized= (1 + Total Return)^(1/years) - 1
- Cost Basis= Purchase Price + Buy Commission
Understanding Cost Basis
What is cost basis?
Cost basis is the original value of an investment for tax purposes. It includes the purchase price plus any fees, commissions, or other acquisition costs.
Cost basis methods for multiple purchases:
- FIFO (First In, First Out): Oldest shares sold first (IRS default)
- LIFO (Last In, First Out): Newest shares sold first
- Specific Identification: You choose which shares to sell
- Average Cost: Average of all purchase prices (mutual funds only)
Adjustments to cost basis:
- Stock splits (adjust price per share)
- Reinvested dividends (add to basis)
- Return of capital (reduces basis)
- Merger/acquisition (may change basis)
Example of multiple purchases:
- Buy 50 shares @ $40 = $2,000
- Buy 50 shares @ $50 = $2,500
- Total: 100 shares, average cost $45/share
- Sell 50 shares @ $60: FIFO uses $40 cost, LIFO uses $50 cost
How to Use This Calculator
Our stock profit calculator analyzes your trades:
- Enter Purchase Details:
- Number of shares bought
- Purchase price per share
- Commission/fees paid on purchase
- Enter Sale Details:
- Sale price per share
- Commission/fees paid on sale
- Optional - Add Dividends:
- Total dividends received
- Enter Holding Period:
- Buy date and sell date
- For annualized return calculation
Results include:
- Total profit or loss
- Percentage return (ROI)
- Annualized return
- Break-even price
- Tax implications (short vs long-term)
Capital Gains Tax Considerations
Short-term vs long-term capital gains:
- Short-term (held ≤1 year): Taxed as ordinary income (10-37%)
- Long-term (held >1 year): Preferential rates (0%, 15%, or 20%)
2024 Long-term capital gains rates:
- 0%: Single up to $47,025 / Married up to $94,050
- 15%: Single $47,026-$518,900 / Married $94,051-$583,750
- 20%: Above those thresholds
- +3.8%: Net Investment Income Tax for high earners
Tax-loss harvesting:
- Sell losing positions to offset gains
- Up to $3,000 of net losses can offset ordinary income
- Excess losses carry forward to future years
- Beware of wash sale rule (30-day window)
Wash sale rule:
Cannot claim loss if you buy same or substantially identical security within 30 days before or after the sale.
Total Return Analysis
Components of total return:
- Capital appreciation: Price increase from buy to sell
- Dividends: Cash payments during holding period
- Dividend reinvestment: Additional shares purchased with dividends
Why total return matters:
- Price-only returns understate performance of dividend stocks
- High dividend stocks may have lower price appreciation but higher total return
- Reinvested dividends compound over time
Example comparison:
- Growth stock: $100 → $150 (50% price return, 0% dividend)
- Dividend stock: $100 → $120 + $15 dividends (35% total return)
- Growth stock wins on total return in this example
- But with reinvestment over decades, dividends often win
Annualized return calculation:
Annualized Return = (Ending Value / Beginning Value)^(1/years) - 1
Common Mistakes to Avoid
Forgetting fees and commissions:
- Include all trading costs in calculations
- Even "free" brokers may have other costs (spread, payment for order flow)
- Options assignment fees, SEC fees, etc.
Ignoring dividends:
- Dividends are part of total return
- Reinvested dividends change your cost basis
- Qualified vs ordinary dividends have different tax rates
Not accounting for stock splits:
- A 2-for-1 split doubles shares, halves cost basis per share
- Your total cost basis doesn't change
- Track adjusted cost basis carefully
Comparing apples to oranges:
- Always use annualized returns for fair comparison
- 50% return in 5 years ≠ 50% return in 1 year
- Consider risk-adjusted returns
Worked Examples
Basic Stock Profit Calculation
Problem:
Buy 100 shares at $45 with $10 commission. Sell at $58 with $10 commission. Calculate profit and ROI.
Solution Steps:
- 1Total cost: (100 × $45) + $10 = $4,510
- 2Sale proceeds: (100 × $58) - $10 = $5,790
- 3Profit: $5,790 - $4,510 = $1,280
- 4ROI: ($1,280 / $4,510) × 100%
- 5ROI: 28.4%
Result:
Profit: $1,280. Return on investment: 28.4%. The $20 in fees reduced profit by about $20.
Total Return with Dividends
Problem:
Buy 200 shares at $30. Hold for 2 years, receive $240 in dividends. Sell at $35. Calculate total and annualized return.
Solution Steps:
- 1Initial investment: 200 × $30 = $6,000
- 2Capital gain: (200 × $35) - $6,000 = $1,000
- 3Dividends received: $240
- 4Total return: $1,000 + $240 = $1,240
- 5Percentage return: $1,240 / $6,000 = 20.67%
- 6Annualized: (1.2067)^(1/2) - 1 = 9.85%
Result:
Total return: $1,240 (20.67%). Annualized return: 9.85%. Dividends contributed 19% of total return.
Loss Calculation for Tax Purposes
Problem:
Buy 50 shares at $120. Sell at $85 after 8 months. Calculate loss and tax impact.
Solution Steps:
- 1Cost basis: 50 × $120 = $6,000
- 2Sale proceeds: 50 × $85 = $4,250
- 3Capital loss: $4,250 - $6,000 = -$1,750
- 4Holding period: 8 months = short-term loss
- 5Tax benefit: Can offset short-term gains
- 6Or offset up to $3,000 of ordinary income
Result:
Short-term capital loss: $1,750. This can offset gains or up to $3,000 of ordinary income. Unused losses carry forward.
Tips & Best Practices
- ✓Always include trading fees and commissions in profit calculations
- ✓Track your cost basis carefully for accurate tax reporting
- ✓Consider holding for more than 1 year for long-term capital gains rates
- ✓Use tax-loss harvesting to offset gains, but beware of wash sale rules
- ✓Calculate total return including dividends, not just price appreciation
- ✓Use annualized returns to compare investments fairly
- ✓Keep records of all purchases, especially for dividend reinvestment
- ✓Consider after-tax returns when comparing taxable vs tax-advantaged accounts
Frequently Asked Questions
Sources & References
- IRS: Capital Gains and Losses (2024)
- SEC: Investor.gov (2024)
- FINRA: Investment Returns (2024)
Last updated: 2026-01-22