Weighted Average Cost of Capital (WACC)
The Weighted Average Cost of Capital (WACC) is a financial metric used to estimate the cost of capital for a company. It represents the average rate of return a company must pay to its investors for using their capital. WACC takes into account the cost of both equity and debt, weighted by their respective proportions in the company’s capital structure.
The formula is as follows:
\[\text{Market Value of Equity} = \text{Share Price} \cdot \text{Total Shares Outstanding}\] \[\text{Market Value of Debt} = \text{Total Debt}\] \[\text{Total Market Value} = \text{Market Value of Equity} + \text{Market Value of Debt}\] \[\text{Cost of Equity} = \text{Risk Free Rate} + \text{Beta} \cdot (\text{Benchmark Return} - \text{Risk Free Rate})\] \[\text{Cost of Debt} = \text{Interest Expense} / \text{Total Debt}\] \[\text{WACC} = (\text{Market Value of Equity} / \text{Total Market Value}) \cdot \text{Cost of Equity} + (\text{Market Value of Debt} / \text{Total Market Value}) \cdot \text{Cost of Debt} \cdot (1 - \text{Corporate Tax Rate})\]Cost of Equity (Re): The cost of equity represents the return required by the company’s shareholders or equity investors. It is the cost of raising funds by selling equity (such as common stock). The cost of equity is often estimated using methods like the Capital Asset Pricing Model (CAPM) or the Dividend Discount Model (DDM).
Cost of Debt (Rd): The cost of debt is the interest rate the company pays on its outstanding debt. It is the cost of raising funds through borrowing, such as issuing bonds or taking loans. The cost of debt is typically based on the prevailing interest rates in the market and the company’s creditworthiness.
Corporate Tax Rate (Tc): The corporate tax rate is the percentage of a company’s profits that is paid in taxes. It is used to calculate the tax shield on interest payments. Interest expenses on debt reduce taxable income, and the tax shield represents the tax savings resulting from these deductions.
Market Value of Equity (E): The market value of equity is the total value of the company’s outstanding shares of common stock. It is calculated by multiplying the current stock price by the number of shares outstanding.
Market Value of Debt (D): The market value of debt is the total value of the company’s outstanding debt obligations, such as bonds and loans. It represents the current market price of the debt instruments.
Total Market Value of Capital (V): The total market value of capital is the sum of the market value of equity and the market value of debt (V = E + D). It represents the total value of the company’s financing, both through equity and debt.
Also known as: WACC, blended cost of capital, discount rate.
No programming experience? With the Finance Toolkit MCP server, AI assistants such as Claude and ChatGPT can calculate the Weighted Average Cost of Capital (WACC) for you. Just ask in plain English.
Calculate the Weighted Average Cost of Capital (WACC) in Python
The Weighted Average Cost of Capital (WACC) is available in the Models module of the open-source Finance Toolkit. Install it with:
pip install financetoolkit -U
Then call get_weighted_average_cost_of_capital as shown below.
from financetoolkit import Toolkit
toolkit = Toolkit(["AAPL", "TSLA"], api_key="FINANCIAL_MODELING_PREP_KEY")
toolkit.models.get_weighted_average_cost_of_capital().loc["AAPL"]
Which returns:
| 2021 | 2022 | 2023 | 2024 | 2025 | |
|---|---|---|---|---|---|
| Market Value Equity | 2.9947e+12 | 2.12121e+12 | 3.04439e+12 | 3.8585e+12 | 4.07918e+12 |
| Market Value Debt | 1.36522e+11 | 1.3248e+11 | 1.2393e+11 | 1.19059e+11 | 1.12377e+11 |
| Cost of Equity | 0.3494 | -0.2646 | 0.2633 | 0.2266 | 0.1938 |
| Cost of Debt | 0.0194 | 0.0221 | 0.0317 | 0 | 0 |
| Corporate Tax Rate | 0.133 | 0.162 | 0.1472 | 0.2409 | 0.1561 |
| Weighted Average Cost of Capital | 0.3349 | -0.248 | 0.2541 | 0.2198 | 0.1886 |
Parameters
get_weighted_average_cost_of_capital accepts the following parameters:
- show_full_results (bool, optional): Whether to show the full results or just the WACC values. Defaults to True.
- diluted (bool, optional): Whether to use diluted shares in the calculation. Defaults to True.
- rounding (int, optional): The number of decimals to round the results to. Defaults to 4.
- growth (bool, optional): Whether to calculate the growth of the values. Defaults to False.
- lag (int | str, optional): The lag to use for the growth calculation. Defaults to 1.
- standardize (bool, optional): Whether to standardize (Z-Score) the result. When combined with growth=True, standardizes the growth values instead of the raw values. Defaults to False.
- trailing (int | None, optional): The trailing period to use for the calculation. Defaults to None.
Related Models
The Models module page introduces the module, and the sidebar lists all of its functions.