ForHosting KIT · Finance & money

Cost of capital calculator

With 60% equity at 10%, 40% debt at 5% and a 21% tax rate, the cost of capital is 7.58%: 6 points from equity and 1.58 from after-tax debt. Enter the five inputs to get the discount rate for a valuation or a project screen. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
Cost of equity
10
Cost of debt
5
Equity weight
0.6
Debt weight
0.4
Tax rate
21
You get
After tax cost of debt
3.95
Equity contribution
6
Debt contribution
1.58
Wacc
0.0758

The weighted average cost of capital, or WACC, is the blended hurdle rate a firm pays to finance its assets with equity and after-tax debt. Given the cost of equity, the cost of debt, the capital-structure weights of those two claims, and the corporate tax rate, WACC equals the equity weight times the equity cost plus the debt weight times the after-tax cost of debt. Analysts, students, and valuation tools look up this number whenever they need a discount rate for free cash flow, a project screen, or a fair-return check against a quoted enterprise value. This cost of capital calculator accepts those five inputs, applies the textbook identity, and returns WACC as a decimal and as a percent together with the after-tax cost of debt and each source's contribution.

What WACC means and how the identity is applied

The weighted average cost of capital is the expected return the capital market requires on a firm's existing claims, mixed in proportion to how much of the firm those claims finance. In the two-source textbook case the mix is equity and interest-bearing debt. Cost of equity is the return shareholders require, often taken from CAPM or a build-up model.

Cost of debt is the yield the firm would pay on new borrowing, not a coupon left on a stale issue. Because interest is tax-deductible in most corporate systems, the relevant debt cost is after tax: Rd times one minus the corporate tax rate Tc. The capital-structure weights are market-value shares of total capital, not book shares, and they are fractions that must add to one: we plus wd equals one.

Algebraically WACC equals we times Re plus wd times Rd times (1 minus Tc). A firm with sixty percent equity at ten percent, forty percent debt at five percent, and a twenty-one percent tax rate therefore has WACC of six plus one point five eight, or seven point five eight percent. When the firm is all equity, WACC collapses to the cost of equity and the tax shield drops out.

When the tax rate is zero, the debt term is just the pretax cost of debt. WACC is a required-return identity, not a realized-return tracker: it prices the mix of claims, not last year's earnings yield, which is why two firms with the same weights and the same component costs share the same model WACC even if one just reported a surprise.

Where a cost of capital calculator earns its keep

Corporate-finance desks use the same figure as the discount rate for unlevered free cash flow, as a project screen, and as the explanation for why a highly levered capital structure can look cheaper after the interest tax shield. Educators and LMS platforms need a deterministic oracle for homework that asks students to compute WACC equals we times Re plus wd times Rd times (1 minus Tc), including the all-equity case and the trap where weights sum to ninety or one hundred ten percent instead of one.

Content teams can contrast pretax and after-tax debt cost so readers see why the tax shield is not optional in the identity. Failed validation does not consume balance. The capability never invents a cost of equity from prices or a tax rate from a jurisdiction table; those estimates belong in your data layer, and this calculator only applies the identity once you supply them.

Enterprise DCF discount rate

Turn a published cost of equity, pretax debt yield, two-claim mix, and tax rate into the WACC used to discount unlevered free cash flow.

Project and division hurdles

Show why two divisions that share a cost of equity still get different required returns once their debt weights and tax shields differ.

Classroom WACC homework keys

Mark problems that ask students to compute WACC = we×Re + wd×Rd×(1−Tc), including all-equity firms and weight pairs that do not sum to one.

How is WACC calculated?

WACC = we × Re + wd × Rd × (1 − Tc). Weights are fractions of total capital that must sum to one. Re and Rd are annual percents; Tc is a corporate percent. This calculator also returns the after-tax cost of debt and each source's contribution.

Why must equity and debt weights sum to one?

WACC is a weighted average of the claims that finance the firm. If we + wd is not one, the mix is not a complete capital structure.

Why is the cost of debt after tax?

Interest is tax-deductible in most corporate systems, so the relevant debt cost is Rd × (1 − Tc). Equity has no equivalent shield in this identity. A zero tax rate leaves the pretax cost of debt unchanged.

Should the weights use market values or book values?

Market values. Each weight is the market-value share of total capital that equity or debt represents, not the figure on the balance sheet. Enter them as fractions, such as 0.6 and 0.4.

Which cost of debt should I use?

The yield the firm would pay on new borrowing today, before tax. Do not use the coupon left on an old bond; the calculator then applies the tax shield to turn it into the after-tax cost.

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.

POSThttps://api.kit.forhosting.com/fin/cost-of-capital

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.

curl -X POST https://api.kit.forhosting.com/fin/cost-of-capital \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"cost_of_equity":10,"cost_of_debt":5,"equity_weight":0.6,"debt_weight":0.4,"tax_rate":21}'
{
  "cost_of_equity": 10,
  "cost_of_debt": 5,
  "equity_weight": 0.6,
  "debt_weight": 0.4,
  "tax_rate": 21
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "fin.cost_of_capital",
  "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.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

Weights that do not sum to one fail with invalid_input instead of silently renormalizing a broken capital structure.

What WACC means and how the identity is applied

This endpoint does not fetch live betas, credit spreads, or statutory tax tables; 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. Missing or non-finite fields fail the same way. A tax rate outside zero through one hundred is rejected because it is not a well-posed corporate rate. Example: cost of equity ten, cost of debt five, equity weight zero point six, debt weight zero point four, tax rate twenty-one yields an after-tax debt cost of three point nine five percent and a WACC of seven point five eight percent, or zero point zero seven five eight as a decimal. POST a JSON body with five required finite numbers: cost_of_equity as an annual percent such as ten for ten percent (aliases re, ke, equity_cost, and r_e); cost_of_debt as an annual percent for the pretax borrowing yield (aliases rd, kd, debt_cost, and r_d); equity_weight as a fraction of total capital, for example zero point six, not sixty (aliases we, weight_equity, and e_over_v); debt_weight as the complementary fraction (aliases wd, weight_debt, and d_over_v); and tax_rate as a corporate percent such as twenty-one for twenty-one percent (aliases tc, tax, and tax_percent). The distinctive failure is a capital structure that does not add up: if equity_weight plus debt_weight is not one within a tiny numerical tolerance, the task fails with invalid_input naming the sum, and the call is not billed. On success the body echoes the five inputs and adds after_tax_cost_of_debt, equity_contribution, debt_contribution, wacc as a decimal ratio, wacc_percent in the same percent units as the cost inputs, weight_sum, and a formula string restating the identity. Pair the response with your own market values and yield estimates; this endpoint measures the identity only and does not lever beta, currency-convert, or annualize. Keep the five required fields as JSON numbers or numeric strings, never as booleans, so the solver can reject a broken weight pair without guessing a residual.

Where a cost of capital calculator earns its keep

Integrators wire the endpoint into notebooks, n8n flows, or edge workers to pin goldens whenever a valuation spreadsheet changes the debt weight. Keep equity_weight plus debt_weight equal to one, pin the rounded wacc fields in tests, and you get reproducible weighted average costs of capital for widgets, classrooms, and production without standing up a full valuation library of your own.

Are the rates entered as percents or decimals?

cost_of_equity, cost_of_debt, and tax_rate are annual percents (10 means 10%, 21 means 21%). equity_weight and debt_weight are fractions (0.6 means 60% of capital). The response includes wacc as a decimal ratio and wacc_percent in the same percent units as the cost inputs.

What does the cost of capital calculator cost?

The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; a weight pair that does not sum to one, and any other invalid input, is not billed.

Read the full KIT documentation →