How to Calculate Stock Returns
A stock's return over a given period is straightforward to compute: take today's closing price, subtract the price at the start of the period, and divide by that starting price. Multiply by 100 to express as a percentage.
Return (%) = (Price today − Price N days ago) / Price N days ago × 100
This calculator measures returns over six standard windows — 1-day, 7-day, 30-day, 60-day, 90-day, year-to-date (YTD), and 1-year — giving you a multi-timeframe snapshot of how any asset has performed. Short windows reveal momentum; longer windows reveal trend and cycle.
Understanding Rolling Volatility
Volatility measures how much a price fluctuates. The most common financial definition is the standard deviation of daily log returns, annualized so it can be compared across assets and periods.
The formula for daily log return on day t is:
r_t = ln(Price_t / Price_{t−1})
Then volatility over a window of N days is:
σ_N = std_dev(r_1, r_2, … r_N) × √252
Multiplying by √252 annualizes the figure (there are approximately 252 trading days per year). A 30-day volatility of 20% means that, based on the last 30 trading days, you'd expect about ±20% price swings per year under a normal distribution assumption.
Rolling means this window slides forward each day. By plotting rolling volatility over time, you can see when risk spiked (e.g., during earnings, market crashes, geopolitical events) and when conditions were calm.
Why Compare Multiple Symbols?
Viewing a stock in isolation tells you how it behaved. Comparing it against a benchmark (like SPY for US stocks, or QQQ for tech) tells you whether that behavior was driven by market-wide forces or something specific to the company. Comparing two similar stocks reveals relative strength — which is outperforming the other in the same sector.
Common use cases:
- Benchmark comparison: Add AAPL and SPY to see if Apple is beating the S&P 500.
- Sector peer comparison: Compare AAPL, MSFT, GOOGL to assess tech leadership.
- Portfolio holdings review: Check which positions are dragging performance vs. outperforming.
- Risk assessment: Compare volatility of a high-growth stock vs. a defensive ETF before rebalancing.
- Indonesian stocks: Search with suffix
.JK(e.g., BBCA.JK, TLKM.JK) to analyze IDX-listed equities. - Crypto: Use Yahoo Finance format — BTC-USD, ETH-USD, BNB-USD.
- Forex: EURUSD=X, USDJPY=X, USDIDR=X.
Interpreting the Return Chart
The return chart normalizes all selected symbols to a common starting base of 100. This removes the effect of different price levels (a $3,000 stock vs. a $15 stock) and shows pure percentage performance from the same starting point. A line ending at 130 means the asset is up 30% from the chart's start date. This is the standard way institutional investors compare heterogeneous assets.
Volatility as a Risk Proxy
Volatility is not perfect as a risk measure — it treats upside and downside fluctuations equally, and past volatility doesn't guarantee future volatility. But it remains the most widely used practical risk proxy because it is:
- Objective and computable from price history alone
- The core input to options pricing (Black-Scholes uses σ as the key parameter)
- The denominator in the Sharpe ratio (return ÷ volatility = risk-adjusted return)
- Used by institutional investors to set position sizes via volatility targeting
As a rule of thumb: 10–15% annualized vol is "low" (think short-term government bond ETF or stablecoin), 20–30% is "medium" (blue-chip stocks like AAPL or SPY in normal conditions), and 50%+ is "high" (small-cap speculative stocks, crypto).
Related Tools
- Compound Interest Calculator — project long-term savings growth
- FIRE / Retirement Calculator — estimate retirement date with Monte Carlo
- Bond YTM Calculator — yield, duration, convexity
- Mortgage Calculator — amortization and extra payment scenarios