Investment Calculations & Methodology
Understanding the math behind your investment returns. This guide explains every calculation and term we use on StocksBio.
Table of Contents
1. Monthly Returns
A monthly return measures the percentage change in a stock's price from the end of one month to the end of the next month.
Formula
Monthly Return = ((End Price - Start Price) / Start Price) × 100
Example
If Apple stock was $150 at the end of January and $165 at the end of February:
Monthly Return = (($165 - $150) / $150) × 100 = +10%
2. Annual Returns
An annual return measures the percentage change in a stock's price over a calendar year (January 1 to December 31).
Formula
Annual Return = ((Dec 31 Price - Jan 1 Price) / Jan 1 Price) × 100
Example
If Apple stock was $130 on January 1, 2023 and $190 on December 31, 2023:
Annual Return = (($190 - $130) / $130) × 100 = +46.15%
3. Total Return
Total return measures the complete percentage gain or loss over a specific period. It's calculated by compounding monthly returns.
Formula (Compounding)
Total Return = [(1 + r₁) × (1 + r₂) × ... × (1 + rₙ) - 1] × 100
Where r₁, r₂, etc. are monthly returns as decimals (e.g., 10% = 0.10)
Example
If a stock returned +10% in Month 1, -5% in Month 2, and +8% in Month 3:
Total Return = [(1.10) × (0.95) × (1.08) - 1] × 100 = +12.86%
Note: This is different from simply adding the returns (10% - 5% + 8% = 13%)
4. CAGR (Compound Annual Growth Rate)
CAGR represents the mean annual growth rate of an investment over a specified time period longer than one year. It smooths out volatility to show a steady annual rate.
Formula
CAGR = [(Ending Value / Beginning Value)^(1/n) - 1] × 100
Where n = number of years
Example
If $1,000 invested in Apple grew to $5,000 over 10 years:
CAGR = [($5,000 / $1,000)^(1/10) - 1] × 100 = [(5)^0.1 - 1] × 100 = 17.46%
This means the investment grew at an average rate of 17.46% per year.
Why CAGR matters
CAGR provides a smoothed rate that ignores yearly volatility. A stock might return +50% one year and -20% the next, but CAGR gives you a single annualized figure for easy comparison between investments.
5. $1,000 Investment Growth
We calculate how a hypothetical $1,000 lump sum investment would have grown by applying each month's return sequentially.
Formula
Value after month n = $1,000 × (1 + r₁) × (1 + r₂) × ... × (1 + rₙ)
Example
Starting with $1,000:
| Month | Return | Calculation | Value |
|---|---|---|---|
| Start | - | - | $1,000 |
| Month 1 | +10% | $1,000 × 1.10 | $1,100 |
| Month 2 | -5% | $1,100 × 0.95 | $1,045 |
| Month 3 | +8% | $1,045 × 1.08 | $1,129 |
6. Dollar-Cost Averaging (DCA)
Dollar-Cost Averaging is an investment strategy where you invest a fixed amount at regular intervals (e.g., $500 per month), regardless of the stock price. This approach:
- Buys more shares when prices are low
- Buys fewer shares when prices are high
- Reduces the impact of short-term volatility
- Removes the stress of timing the market
How We Calculate DCA Returns
Each month: Portfolio Value = (Previous Value + Monthly Investment) × (1 + Monthly Return)
Example: $500/month DCA
| Month | Invest | Return | Calculation | Value |
|---|---|---|---|---|
| Month 1 | $500 | +10% | ($0 + $500) × 1.10 | $550 |
| Month 2 | $500 | -5% | ($550 + $500) × 0.95 | $998 |
| Month 3 | $500 | +8% | ($998 + $500) × 1.08 | $1,617 |
Total invested: $1,500 → Final value: $1,617 → DCA Return: +7.8%
7. Lump Sum Investing
Lump sum investing means investing your entire amount at once, rather than spreading it over time.
How We Calculate Lump Sum Returns
Final Value = Initial Investment × (1 + r₁) × (1 + r₂) × ... × (1 + rₙ)
Example: $1,500 Lump Sum (same period as DCA example)
Investing $1,500 at the start instead of $500/month:
$1,500 × 1.10 × 0.95 × 1.08 = $1,693
Lump Sum Return: +12.9% (compared to DCA's +7.8%)
When does Lump Sum win?
Historically, lump sum investing outperforms DCA about 2/3 of the time in rising markets. However, DCA protects against poor timing and provides psychological comfort during volatile periods.
8. DCA vs Lump Sum Comparison
When we compare DCA vs Lump Sum, we ensure both strategies invest the same total amount.
Comparison Method
- • DCA: $500/month for 60 months = $30,000 total invested
- • Lump Sum: $30,000 invested at the start of the same 60-month period
- • Winner: Whichever has the higher final value
DCA Advantages
- ✓ Reduces timing risk
- ✓ Lower average cost in volatile markets
- ✓ Easier to start (smaller amounts)
- ✓ Less stressful emotionally
Lump Sum Advantages
- ✓ Money in market longer (time in market)
- ✓ Historically wins ~66% of the time
- ✓ Simpler (one transaction)
- ✓ Better in steadily rising markets
9. S&P 500 Benchmark (SPY)
The S&P 500 is an index tracking 500 of the largest U.S. publicly traded companies. We use it as a benchmark to compare individual stock performance against "the market."
Why We Use SPY
We use SPY (SPDR S&P 500 ETF Trust) as our S&P 500 benchmark because:
- • It's the most liquid S&P 500 ETF
- • Investors can actually buy SPY (unlike the index itself)
- • Real-world comparison for investment decisions
Important Caveat
SPY has an expense ratio of 0.09% per year. This means SPY slightly underperforms the actual S&P 500 index (^GSPC) over very long periods. For a 10-year period, this difference amounts to approximately 0.9% total. For practical investment comparisons, this difference is negligible.
10. Median vs Average
We show both median and average returns because they tell different stories.
Average (Mean)
Sum of all values divided by count. Can be skewed by extreme values (outliers).
Returns: -20%, +5%, +10%, +15%, +100%
Average = 22%
Median
Middle value when sorted. Not affected by outliers. Shows "typical" performance.
Returns: -20%, +5%, +10%, +15%, +100%
Median = 10%
Which to use?
Median is often more useful for stock returns because a few exceptional months (like +100% gains or -50% crashes) can dramatically skew the average. The median tells you what a "typical" month looks like.
11. Data Sources & Limitations
Data Source
All stock price data is sourced from Yahoo Finance via the yfinance API. Prices are adjusted for stock splits and dividends.
Update Frequency
Data is updated weekly to reflect the latest market prices.
Limitations
- Past performance: Historical returns do not guarantee future results
- Dividends: Our return calculations use adjusted close prices which include dividends reinvested
- Taxes & fees: Calculations don't account for taxes, trading fees, or bid-ask spreads
- Inflation: Returns shown are nominal, not adjusted for inflation
- Survivorship bias: We only show stocks that exist today; failed companies are not included
Not Financial Advice
StocksBio provides educational information only. Nothing on this site constitutes financial, investment, legal, or tax advice. Always consult a qualified financial advisor before making investment decisions.