Stock Analysis Calculator
Pull a quote and fundamentals from Alpha Vantage with your own free key, then compare price with a discounted earnings value, P/E and P/B estimates.
The interactive tool loads here when JavaScript runs.
About this toolWhat is the Stock Analysis Calculator?
The Stock Analysis Calculator turns a ticker into a one-page valuation summary: price, market cap, P/E, P/B, EPS, book value, ROE, debt-to-equity, dividend yield, growth, beta and the 52-week range, plus three rough estimates of fair value and the gap between their average and the current price.
Real data needs a free Alpha Vantage API key. With a key, your browser calls alphavantage.co directly (the OVERVIEW and GLOBAL_QUOTE endpoints); the key is held in the page only and is not stored. Without a key, Analyze fills the page with random simulated numbers labelled as demo data so you can explore the layout, and Load Sample shows a fixed Apple example.
The fair value figures are formula outputs with fixed assumptions, not price targets. Treat them as a starting point for questions, and treat the whole page as education rather than financial advice.
- Live quote and fundamentals from Alpha Vantage with your own key
- Discounted earnings, P/E and P/B fair value estimates
- Formula tooltips for every ratio
- Simple financial health score out of 100
- Text and PNG report downloads
Updated
How to use the Stock Analysis Calculator
- Type a ticker such as MSFT into the ticker box.
- Paste your Alpha Vantage key into the optional key field for live data, or leave it empty to see simulated demo numbers.
- Click Analyze, or Load Sample to see the built-in Apple example.
- Compare the current price with the DCF, P/E-based and P/B-based values on the Valuation tab, then check Fundamentals, Growth and Technicals. Hover the info icons for each metric's formula.
- Download the summary as a text file or a PNG image.
Worked examples
The Apple sample
Input
Load Sample: price 185.25, EPS 6.50, book value 14.47, earnings growth 11%
Output
DCF 126.34, P/E value 130.00, P/B value 36.18, average 97.51, upside -47.37%
P/E 28.5 means the market pays far more than the 20x the tool assumes, and the asset-light balance sheet drags the P/B estimate down. The negative gap says the price assumes more growth than 11% for five years, not that Apple is a sell.
Checking the DCF by hand
Input
EPS 5.00, earnings growth 8%
Output
Discounted earnings value 86.01
Five years of EPS growing 8% and discounted at 10% are worth about 23.7; the terminal value of about 100.4 in year five is worth about 62.3 today. With growth of 50% the result is the same as with 20%, because growth is capped at 20%.
Background and insight
The three estimates use different lenses. The P/E value is EPS × 20, a market-like multiple. The P/B value is book value per share × 2.5. The discounted earnings value is a two-stage DCF on a per-share basis: EPS grows at the reported year-on-year earnings growth (clamped to between -10% and 20%) for five years, each year is discounted at 10%, and a terminal value of EPS₅ × 1.025 / (0.10 − 0.025) is discounted back from year five. Free cash flow is not in Alpha Vantage's overview, so EPS stands in for cash flow, which flatters companies whose earnings outrun their cash.
Each method breaks in predictable places. P/B is close to meaningless for software or brand-heavy firms whose main assets are not on the balance sheet, which is why the Apple sample shows a P/B value near 36 against a price of 185. The DCF is very sensitive to the gap between the discount rate and terminal growth: moving terminal growth from 2.5% to 3.5% lifts the terminal value by about 16%. Negative EPS produces zero for both earnings-based methods, so losses always look "overvalued".
A common gotcha with the API is the free tier's rate limit. Alpha Vantage answers an over-limit request with a "Note" or "Information" message and an empty quote rather than an error code; the calculator now shows that message instead of a price of zero.
Common use cases
Sanity-checking a hot stock
See how much growth the current price implies compared with a plain DCF at 10%.
Learning valuation ratios
Use the formula tooltips to see how P/E, P/B, ROE and dividend yield are defined.
Screening before deep research
Pull a quick snapshot of leverage, ROE and growth before reading the annual report.
Teaching
Show students why P/B fails for asset-light companies and why negative earnings break P/E.
Tips and limitations
- Simulated demo data is random for every click and has nothing to do with the real company. Add a key before drawing any conclusion.
- Alpha Vantage's quarterly year-on-year earnings growth can swing wildly. That is why the DCF clamps it between -10% and 20%.
- P/E is shown as 0 when earnings are negative, because a P/E on losses has no useful meaning.
- Dividend yield is annual dividends per share divided by price. A very high yield often means the price fell, not that the payout is safe.
- Free cash flow and average volume are not available from the free endpoints and show as 0 with a real key.
Sources and further reading
- Alpha Vantage API Documentation, Alpha Vantage. The OVERVIEW and GLOBAL_QUOTE endpoints the calculator calls
- Beginners' Guide to Financial Statements, US Securities and Exchange Commission. Where earnings per share and book value come from
- Berkshire Hathaway Shareholder Letters, Berkshire Hathaway. Buffett on intrinsic value as discounted future cash
Frequently asked questions
How do I calculate the P/E ratio of a stock?
Divide the share price by earnings per share over the last twelve months. A stock at 185.25 with EPS of 6.50 has a P/E of 28.5, meaning investors pay 28.5 dollars for each dollar of annual profit. When EPS is negative the ratio is not meaningful, and this calculator shows 0.
How does this calculator estimate intrinsic value with DCF?
It projects EPS for five years at the company's earnings growth (limited to -10% to 20%), discounts each year at 10%, and adds a terminal value that grows 2.5% a year forever, also discounted. EPS is used in place of free cash flow because the free data source does not provide cash flow.
Why is the P/B fair value so low for tech companies?
Because book value only counts assets on the balance sheet, and software, brands and patents built in-house barely appear there. Apple's book value of about 14.47 a share times 2.5 gives roughly 36, far below its price. Ignore P/B for asset-light businesses and weight it more for banks and insurers.
Do I need an API key to use the stock analysis calculator?
Only for real data. A free Alpha Vantage key lets the page fetch the quote and company overview straight from alphavantage.co. Without a key, Analyze generates random simulated figures to demonstrate the layout, and Load Sample shows a fixed Apple example.
Why does the analysis fail after a few lookups?
Alpha Vantage's free tier allows only a small number of requests per day, and each analysis uses two. When the limit is hit, the API returns a note instead of data, and the calculator shows that message. Wait for the limit to reset or use a paid key.
What does the potential upside percentage mean?
It is the average of the three fair value estimates minus the current price, divided by the price. A figure of -47% means the formulas, with their fixed 20x P/E, 2.5x P/B and 10% discount rate, value the stock at about half its price. It describes the assumptions as much as the stock.
Is my Alpha Vantage API key stored or shared?
No. The key is kept in the page while it is open and sent only to alphavantage.co with each request. It is not saved to your browser or sent to RedBison, so you need to paste it again after a reload.
Is there an in-depth guide to the Stock Analysis Calculator?
Yes. “Stock Valuation Basics: P/E, P/B, DCF and a Written Thesis” covers the background, how it works, common pitfalls and worked examples. Read the full guide.
Related Tools You May Like
Free, in-browser tools that pair well with this one.