CAPM calculator
A stock with a beta of 1.2, a 4% riskless rate and a 10% expected market return should earn 11.2%: 4 plus 1.2 times the 6-point market premium. Enter your three numbers to get the expected return as a percent and a decimal. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Risk free rate
- 4
- Beta
- 1.2
- Market return
- 10
- Market risk premium
- 6
- Expected return
- 0.112
- Expected return percent
- 11.2
The capital asset pricing model, or CAPM, is the textbook identity that converts an asset's systematic risk into an expected return. Given a risk-free rate, the asset's beta, and the expected market return, expected return equals the risk-free rate plus beta times the market risk premium. Analysts, students, and portfolio tools look up this number whenever they need a hurdle rate, a cost of equity, or a fair-return check against a quoted stock. This CAPM calculator accepts those three inputs, applies the identity, and returns the expected return as a decimal and as a percent together with the implied market risk premium.
What CAPM expected return means and how the identity is applied
The capital asset pricing model states that the expected return on a risky asset equals the risk-free rate plus a risk premium that scales with the asset's beta. Beta is the sensitivity of the asset's excess return to the market's excess return: a beta of one moves with the market, a beta above one amplifies market moves, a beta between zero and one dampens them, and a negative beta moves against the market.
The market risk premium is the expected market return minus the risk-free rate — the extra compensation investors require to hold the market portfolio instead of a Treasury-like claim. Multiplying that premium by beta produces the asset-specific premium, which is then added to the risk-free rate. Algebraically the identity is E(R) equals Rf plus beta times (Rm minus Rf).
A stock with beta 1.2, a four percent risk-free rate, and a ten percent expected market return therefore has an expected return of four plus 1.2 times six, or 11.2 percent. When beta is one, expected return equals the market return. When beta is zero, expected return equals the risk-free rate.
When the market risk premium is zero, expected return equals the risk-free rate regardless of beta. CAPM is a single-factor expected-return model, not a realized-return tracker: it prices systematic risk only and leaves idiosyncratic volatility uncompensated, which is why two stocks with the same beta share the same model return even if one is much noisier day to day.
Where a CAPM calculator earns its keep
Corporate-finance desks use the same figure as a cost of equity when building WACC, screening projects, or explaining why a high-beta division needs a higher required return than a defensive utility. Educators and LMS platforms need a deterministic oracle for homework that asks students to compute E(R) equals Rf plus beta times (Rm minus Rf), including the inverse-asset case where a negative beta pulls expected return below the risk-free rate.
Content teams can contrast the model return with a stock's historical average so readers see why realized alpha is leftover after CAPM, not a replacement for it. Failed validation does not consume balance. The capability never invents a beta from prices or a market premium from an index history; those estimates belong in your data layer, and this calculator only applies the identity once you supply them.
What you can do with it
Cost of equity and project hurdles
Turn a published equity beta, a Treasury-style risk-free rate, and a market forecast into the CAPM required return used in WACC and project screens.
High-beta versus defensive stock comparison
Show why two names that share a risk-free rate still get different expected returns once their betas scale the same market risk premium.
Classroom CAPM homework keys
Mark problems that ask students to compute E(R) = Rf + β(Rm − Rf), including negative-beta hedges, with a deterministic oracle.
FAQ
How is CAPM expected return calculated?
Expected return is E(R) = Rf + β × (Rm − Rf). The market risk premium is Rm minus Rf; multiply that premium by the asset beta and add the risk-free rate. This calculator takes Rf and Rm as percents.
What does beta mean in the CAPM formula?
Beta is the asset's systematic-risk loading versus the market. A beta of 1 tracks the market; above 1 amplifies it; between 0 and 1 dampens it; a negative beta moves against the market and can pull expected return below the risk-free rate.
What happens to the CAPM expected return when beta is negative?
It falls below the riskless rate. A negative beta describes an asset that tends to move against the market, such as a hedge, so the model asks for less return than a safe government-style asset would pay.
Does the CAPM calculator look up live betas or bond yields?
No. You supply all three numbers yourself: the riskless rate, the beta and the expected market return. It does not fetch market data, so the same inputs always give the same expected return.
Can I use the CAPM result as a cost of equity?
Yes. Corporate finance teams use this expected return as the cost of equity when they build a weighted average cost of capital, screen projects, or show why a high-beta division needs a higher required return.
Related tools
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/fin/capm \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"risk_free_rate":4,"beta":1.2,"market_return":10}'const res = await fetch("https://api.kit.forhosting.com/fin/capm", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"risk_free_rate": 4,
"beta": 1.2,
"market_return": 10
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/fin/capm",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"risk_free_rate": 4,
"beta": 1.2,
"market_return": 10
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/fin/capm", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"risk_free_rate":4,"beta":1.2,"market_return":10}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"risk_free_rate":4,"beta":1.2,"market_return":10}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/fin/capm", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"risk_free_rate": 4,
"beta": 1.2,
"market_return": 10
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "fin.capm",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
A beta that is not a finite number fails with invalid_input instead of inventing a loading.
What CAPM expected return means and how the identity is applied
This endpoint does not fetch live betas, Treasury yields, or index forecasts; it applies the identity you supply so homework keys, landing-page widgets, and automation share one auditable number.
Input contract, response shape, and error behaviour
An optional decimals integer from zero through twelve (default six) controls half-up rounding on the numeric outputs. Rates may be negative when a market quotes a negative nominal risk-free rate or a negative expected market return; the identity remains well-defined. Example: risk-free rate four, beta one point two, market return ten yields a six-point market risk premium and an expected return of eleven point two percent, or zero point one one two as a decimal. POST a JSON body with three required finite numbers: risk_free_rate as an annual percent such as four for four percent (aliases rf, risk_free, and r_f); beta, the asset's systematic-risk loading, which must be a finite number and may be negative for inverse or hedging assets (aliases beta_i and asset_beta); and market_return as an annual percent for the expected market portfolio return (aliases rm, expected_market_return, market_expected_return, and r_m). The distinctive failure is a non-finite beta: missing, empty, NaN, or infinite beta fails with invalid_input naming the field, and the call is not billed. Missing or non-finite risk_free_rate or market_return fail the same way. On success the body echoes the three inputs and adds market_risk_premium (market_return minus risk_free_rate, in percent), expected_return as a decimal ratio, expected_return_percent, and a formula string restating the identity. Pair the response with your own beta estimate and market forecast; this endpoint measures the identity only and does not annualize, currency-convert, or adjust for tax. Keep the three required fields as JSON numbers or numeric strings, never as booleans, so the solver can reject a non-finite beta without guessing a loading of zero or one.
Where a CAPM calculator earns its keep
Integrators wire the endpoint into notebooks, n8n flows, or edge workers to pin goldens whenever a valuation spreadsheet changes the risk-free assumption. Keep beta a finite number, pin the rounded expected_return fields in tests, and you get reproducible CAPM expected returns for widgets, classrooms, and production without standing up a factor-model library of your own.
Technical questions
What happens if beta is not a finite number?
The task fails with invalid_input. A missing, empty, NaN, or infinite beta is not a well-posed loading, so no expected return is invented and the call is not billed.
Are the rates entered as percents or decimals?
risk_free_rate and market_return are annual percents (4 means 4%, 10 means 10%). The response includes expected_return as a decimal ratio and expected_return_percent in the same percent units as the inputs.
What does the CAPM calculator cost?
The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.