Cost of Capital Calculator
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
line-height: 1.6;
margin: 0;
padding: 20px;
background-color: #f8f9fa;
color: #333;
}
.calculator-container {
max-width: 800px;
margin: 30px auto;
background-color: #ffffff;
padding: 30px;
border-radius: 8px;
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
display: flex;
flex-wrap: wrap;
gap: 30px;
}
.calculator-title {
width: 100%;
text-align: center;
color: #004a99;
margin-bottom: 20px;
font-size: 2.2em;
font-weight: 600;
}
.input-section, .result-section {
flex: 1;
min-width: 300px;
}
.input-group {
margin-bottom: 20px;
padding: 15px;
background-color: #e9ecef;
border-radius: 5px;
border: 1px solid #dee2e6;
}
.input-group label {
display: block;
margin-bottom: 8px;
font-weight: 500;
color: #004a99;
}
.input-group input[type="number"],
.input-group input[type="text"] {
width: calc(100% – 22px);
padding: 12px;
border: 1px solid #ced4da;
border-radius: 4px;
font-size: 1em;
box-sizing: border-box;
}
.input-group input[type="number"]:focus,
.input-group input[type="text"]:focus {
border-color: #004a99;
outline: none;
box-shadow: 0 0 0 3px rgba(0, 74, 153, 0.2);
}
.btn-calculate {
width: 100%;
padding: 12px 20px;
background-color: #28a745;
color: white;
border: none;
border-radius: 5px;
font-size: 1.1em;
font-weight: bold;
cursor: pointer;
transition: background-color 0.3s ease;
margin-top: 10px;
}
.btn-calculate:hover {
background-color: #218838;
}
.result-section {
background-color: #004a99;
color: white;
padding: 30px;
border-radius: 8px;
text-align: center;
box-shadow: 0 2px 10px rgba(0, 74, 153, 0.3);
}
.result-section h2 {
margin-top: 0;
color: white;
font-size: 1.8em;
}
#waccResult {
font-size: 2.8em;
font-weight: bold;
margin-top: 15px;
color: #28a745;
}
.result-label {
font-size: 1.1em;
margin-top: 10px;
opacity: 0.9;
}
.explanation {
margin-top: 40px;
padding: 30px;
background-color: #ffffff;
border-radius: 8px;
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}
.explanation h2 {
color: #004a99;
border-bottom: 2px solid #004a99;
padding-bottom: 10px;
margin-bottom: 20px;
}
.explanation h3 {
color: #004a99;
margin-top: 25px;
margin-bottom: 10px;
}
.explanation p, .explanation ul {
margin-bottom: 15px;
}
.explanation code {
background-color: #e9ecef;
padding: 2px 6px;
border-radius: 3px;
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
}
@media (max-width: 768px) {
.calculator-container {
flex-direction: column;
}
.input-section, .result-section {
min-width: unset;
width: 100%;
}
.result-section {
order: -1;
}
}
Weighted Average Cost of Capital (WACC) Calculator
Your Weighted Average Cost of Capital (WACC)
–.–%
This is the minimum rate of return your company must earn on its investments to satisfy its investors.
Understanding the Cost of Capital (WACC)
The Weighted Average Cost of Capital (WACC) is a crucial metric used in corporate finance and investment appraisal. It represents the average rate a company expects to pay to finance its assets. Specifically, it's the blended cost of the different types of capital a company uses, primarily debt and equity, weighted by their respective proportions in the company's capital structure. WACC is used as a discount rate in discounted cash flow (DCF) analysis to value projects and companies, and it serves as a hurdle rate for investment decisions.
The WACC Formula
The most common formula for WACC is:
WACC = (E/V * Re) + (D/V * Rd * (1 - Tc))
Where:
E/V: The proportion of equity financing in the company's total capital structure (Market Value of Equity / Total Market Value of Firm).
Re: The Cost of Equity. This is the return a company requires for equity investors. It's often calculated using models like the Capital Asset Pricing Model (CAPM).
D/V: The proportion of debt financing in the company's total capital structure (Market Value of Debt / Total Market Value of Firm).
Rd: The Cost of Debt. This is the interest rate a company pays on its debt.
Tc: The Corporate Tax Rate. Interest payments on debt are typically tax-deductible, so the cost of debt is adjusted for this tax shield.
How the Calculator Works
This calculator takes the following inputs:
- Weight of Equity (E/V): The percentage of the company's total market value that comes from equity.
- Cost of Equity (Re): The expected rate of return for equity holders, typically expressed as an annual percentage.
- Weight of Debt (D/V): The percentage of the company's total market value that comes from debt.
- Cost of Debt (Rd): The interest rate the company pays on its debt, expressed as an annual percentage.
- Corporate Tax Rate (Tc): The company's effective tax rate, expressed as an annual percentage.
It then applies the WACC formula to compute the weighted average cost of capital. The cost of debt is multiplied by (1 - Tc) to account for the tax deductibility of interest payments.
Use Cases for WACC
- Investment Appraisal: WACC is used as the discount rate for Net Present Value (NPV) calculations. Projects with an NPV greater than zero, when discounted at WACC, are considered value-creating.
- Valuation: In Discounted Cash Flow (DCF) models, WACC is used to discount future free cash flows back to their present value, helping to determine the intrinsic value of a company.
- Performance Measurement: Companies can compare their actual returns on investments against their WACC. If returns exceed WACC, the company is creating shareholder value.
- Capital Budgeting: WACC helps in deciding which projects to undertake. Projects expected to generate returns higher than WACC are generally prioritized.
Accurately determining the inputs, especially the cost of equity and the market values of debt and equity, is crucial for a meaningful WACC calculation.
function calculateWACC() {
var equityWeightInput = document.getElementById("equityWeight");
var costOfEquityInput = document.getElementById("costOfEquity");
var debtWeightInput = document.getElementById("debtWeight");
var costOfDebtInput = document.getElementById("costOfDebt");
var corporateTaxRateInput = document.getElementById("corporateTaxRate");
var waccResultDiv = document.getElementById("waccResult");
var equityWeight = parseFloat(equityWeightInput.value);
var costOfEquity = parseFloat(costOfEquityInput.value);
var debtWeight = parseFloat(debtWeightInput.value);
var costOfDebt = parseFloat(costOfDebtInput.value);
var corporateTaxRate = parseFloat(corporateTaxRateInput.value);
var wacc = 0;
// Input validation
if (isNaN(equityWeight) || isNaN(costOfEquity) || isNaN(debtWeight) || isNaN(costOfDebt) || isNaN(corporateTaxRate)) {
waccResultDiv.textContent = "Error: Invalid input.";
waccResultDiv.style.color = "#dc3545";
return;
}
// Normalize percentage inputs to decimal
var equityWeightDecimal = equityWeight / 100;
var costOfEquityDecimal = costOfEquity / 100;
var debtWeightDecimal = debtWeight / 100;
var costOfDebtDecimal = costOfDebt / 100;
var corporateTaxRateDecimal = corporateTaxRate / 100;
// Basic check for weights summing to 100% (allow for small rounding differences)
if (Math.abs(equityWeight + debtWeight – 100) > 0.01 && (equityWeight > 0 || debtWeight > 0)) {
// If weights are explicitly provided and don't sum to 100, use them as given.
// If they are meant to sum to 100, this warning could be useful:
// console.warn("Note: Equity and Debt weights do not sum to 100%. Calculation will proceed with provided values.");
}
// Calculate WACC
var wacc = (equityWeightDecimal * costOfEquityDecimal) + (debtWeightDecimal * costOfDebtDecimal * (1 – corporateTaxRateDecimal));
// Display result
waccResultDiv.textContent = (wacc * 100).toFixed(2) + "%";
waccResultDiv.style.color = "#28a745"; // Success green
}