---
title: ToolRouter — Tool Detail
description: Detailed documentation for a ToolRouter tool including skills, parameters, and examples.
url: https://toolrouter.com/tools/financial-calculator
---
# Financial Calculator

Precise financial math: DCF valuation, WACC with CAPM, bond pricing with duration/convexity, Black-Scholes options with Greeks, loan amortization, present/future value solvers, and portfolio risk metrics (Sharpe, Sortino, max drawdown).

- **Version:** 0.01
- **Categories:** finance

## Skills (7)

### DCF Valuation (`dcf_valuation`)

Run a discounted cash flow valuation model. Projects future cash flows to present value and calculates terminal value using Gordon Growth (perpetuity) or exit multiple method.

**Parameters:**

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `cash_flows` | array | Yes | Projected future cash flows, one per year (e.g. [100, 110, 121, 133, 146]) |
| `discount_rate` | number | Yes | WACC or required rate of return as a decimal (e.g. 0.10 for 10%) |
| `terminal_growth_rate` | number | No | Perpetuity growth rate for terminal value (default: 0.025 = 2.5%). Must be less than discount_rate. |
| `terminal_method` | string | No | Terminal value method: "perpetuity" (Gordon Growth, default) or "exit_multiple" (10x final cash flow) (perpetuity, exit_multiple) |

**Returns:** Enterprise value with per-year present values, terminal value breakdown, and implied value composition

**Examples:**

*Value a company with 5 years of projected cash flows at 10% discount rate:*

```json
{
  "cash_flows": [
    100,
    110,
    121,
    133,
    146
  ],
  "discount_rate": 0.1
}
```

*DCF with exit multiple terminal value:*

```json
{
  "cash_flows": [
    50,
    60,
    72,
    86
  ],
  "discount_rate": 0.12,
  "terminal_method": "exit_multiple"
}
```

### WACC Calculator (`wacc_calculator`)

Calculate the weighted average cost of capital from equity value, debt value, cost of equity, cost of debt, and tax rate. Optionally compute cost of equity via the Capital Asset Pricing Model (CAPM).

**Parameters:**

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `equity_value` | number | Yes | Market value of equity (market cap) |
| `debt_value` | number | Yes | Market value of debt |
| `cost_of_equity` | number | No | Required return on equity as a decimal (e.g. 0.10 for 10%). Omit if providing CAPM inputs. |
| `cost_of_debt` | number | Yes | Pre-tax cost of debt as a decimal (e.g. 0.05 for 5%) |
| `tax_rate` | number | Yes | Corporate tax rate as a decimal (e.g. 0.21 for 21%) |
| `beta` | number | No | Equity beta for CAPM calculation (e.g. 1.2) |
| `risk_free_rate` | number | No | Risk-free rate for CAPM (e.g. 0.04 for 4%) |
| `market_premium` | number | No | Equity risk premium (Rm - Rf) for CAPM (e.g. 0.06 for 6%) |

**Returns:** WACC with capital structure weights, cost components, tax shield, and optional CAPM breakdown

**Examples:**

*Calculate WACC with known cost of equity:*

```json
{
  "equity_value": 800,
  "debt_value": 200,
  "cost_of_equity": 0.1,
  "cost_of_debt": 0.05,
  "tax_rate": 0.21
}
```

*Calculate WACC with CAPM for cost of equity:*

```json
{
  "equity_value": 600,
  "debt_value": 400,
  "cost_of_debt": 0.06,
  "tax_rate": 0.25,
  "beta": 1.2,
  "risk_free_rate": 0.04,
  "market_premium": 0.06
}
```

### Bond Pricing (`bond_pricing`)

Value a bond and compute yield analytics. Provide market_rate to calculate the bond price, or market_price to solve for yield to maturity (YTM). Returns price, YTM, current yield, Macaulay duration, modified duration, and convexity.

**Parameters:**

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `face_value` | number | Yes | Par/face value of the bond (e.g. 1000) |
| `coupon_rate` | number | Yes | Annual coupon rate as a decimal (e.g. 0.05 for 5%) |
| `years_to_maturity` | number | Yes | Years until the bond matures |
| `market_rate` | number | No | Required market yield/discount rate as a decimal. Provide this to calculate bond price. |
| `market_price` | number | No | Current market price of the bond. Provide this instead of market_rate to solve for YTM. |
| `frequency` | number | No | Coupon payments per year: 1 (annual), 2 (semi-annual, default), 4 (quarterly), 12 (monthly) (1, 2, 4, 12) |

**Returns:** Bond price, YTM, current yield, Macaulay duration, modified duration, convexity, premium/discount status, and total cash flows

**Examples:**

*Price a 5% semi-annual bond at 6% market rate:*

```json
{
  "face_value": 1000,
  "coupon_rate": 0.05,
  "years_to_maturity": 10,
  "market_rate": 0.06
}
```

*Calculate YTM for a bond trading at 950:*

```json
{
  "face_value": 1000,
  "coupon_rate": 0.05,
  "years_to_maturity": 10,
  "market_price": 950
}
```

### Option Pricing (`option_pricing`)

Value European options using the Black-Scholes model with optional continuous dividend yield (Merton extension). Returns option price, all five Greeks (delta, gamma, theta, vega, rho), put-call parity, and moneyness.

**Parameters:**

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `spot_price` | number | Yes | Current price of the underlying asset |
| `strike_price` | number | Yes | Option strike price |
| `time_to_expiry` | number | Yes | Time to expiration in years (e.g. 0.5 for 6 months, 0.25 for 3 months) |
| `risk_free_rate` | number | Yes | Risk-free interest rate as a decimal (e.g. 0.05 for 5%) |
| `volatility` | number | Yes | Annualized volatility as a decimal (e.g. 0.25 for 25%) |
| `option_type` | string | No | Option type: "call" (default) or "put" (call, put) |
| `dividend_yield` | number | No | Continuous dividend yield as a decimal (e.g. 0.02 for 2%). Default: 0. |

**Returns:** Option price, all five Greeks, intrinsic/time value decomposition, put-call parity prices, and Black-Scholes model intermediates

**Examples:**

*Price a call option on a $100 stock:*

```json
{
  "spot_price": 100,
  "strike_price": 105,
  "time_to_expiry": 0.5,
  "risk_free_rate": 0.05,
  "volatility": 0.25
}
```

*Price a put option with dividend yield:*

```json
{
  "spot_price": 50,
  "strike_price": 48,
  "time_to_expiry": 0.25,
  "risk_free_rate": 0.04,
  "volatility": 0.3,
  "option_type": "put",
  "dividend_yield": 0.02
}
```

### Loan Amortization (`loan_amortization`)

Generate a loan payment schedule with principal/interest breakdown. Supports monthly, biweekly, and weekly payment frequencies. Optionally model extra payments to see accelerated payoff savings.

**Parameters:**

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `principal` | number | Yes | Loan amount (e.g. 300000) |
| `annual_rate` | number | Yes | Annual interest rate as a decimal (e.g. 0.065 for 6.5%) |
| `years` | number | Yes | Loan term in years (e.g. 30) |
| `frequency` | string | No | Payment frequency: "monthly" (default), "biweekly", or "weekly" (monthly, biweekly, weekly) |
| `extra_payment` | number | No | Additional payment per period above the standard payment (e.g. 200) |

**Returns:** Payment schedule with per-period principal/interest breakdown, loan summary, and optional accelerated payoff comparison

**Examples:**

*Monthly amortization for a $300K mortgage at 6.5%:*

```json
{
  "principal": 300000,
  "annual_rate": 0.065,
  "years": 30
}
```

*Biweekly payments with $200 extra per period:*

```json
{
  "principal": 250000,
  "annual_rate": 0.055,
  "years": 25,
  "frequency": "biweekly",
  "extra_payment": 200
}
```

### Time Value of Money (`time_value`)

Solve any time value of money problem. Calculate future value, present value, payment, interest rate, or number of periods for lump sums and annuities. Supports ordinary annuities and annuities due.

**Parameters:**

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `calculation` | string | Yes | Which variable to solve for (future_value, present_value, payment, rate, periods) |
| `present_value` | number | No | Present value (lump sum or loan amount) |
| `future_value` | number | No | Future value (target amount) |
| `rate` | number | No | Interest rate per period as a decimal (e.g. 0.005 for 0.5% monthly) |
| `periods` | number | No | Number of compounding periods |
| `payment` | number | No | Periodic payment amount (for annuities) |
| `payment_timing` | string | No | When payments occur: "end" (ordinary annuity, default) or "beginning" (annuity due) (end, beginning) |

**Returns:** The solved variable with full calculation breakdown, total payments, and interest earned/paid

**Examples:**

*How much will $10,000 grow to in 20 years at 7% annually?:*

```json
{
  "calculation": "future_value",
  "present_value": 10000,
  "rate": 0.07,
  "periods": 20
}
```

*What monthly payment to save $100K in 10 years at 6% annual (0.5% monthly)?:*

```json
{
  "calculation": "payment",
  "future_value": 100000,
  "rate": 0.005,
  "periods": 120
}
```

*Present value of $500/month for 30 years at 5% annual (0.4167% monthly):*

```json
{
  "calculation": "present_value",
  "payment": 500,
  "rate": 0.004167,
  "periods": 360
}
```

### Portfolio Metrics (`portfolio_metrics`)

Analyze portfolio risk and return from an array of periodic returns. Calculates annualized return, volatility, Sharpe ratio, Sortino ratio, max drawdown, Calmar ratio, skewness, and kurtosis. With benchmark returns, also computes beta, alpha, tracking error, information ratio, and R-squared.

**Parameters:**

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `returns` | array | Yes | Array of periodic returns as decimals (e.g. monthly: [0.02, -0.01, 0.03, ...]) |
| `benchmark_returns` | array | No | Benchmark returns for the same periods, same length as returns (for beta, alpha, tracking error) |
| `risk_free_rate` | number | No | Annualized risk-free rate as a decimal (default: 0.04 = 4%). Auto-converted to periodic. |

**Returns:** Comprehensive risk/return analytics with Sharpe, Sortino, drawdown, skewness, kurtosis, and optional benchmark comparison metrics

**Examples:**

*Analyze 12 months of portfolio returns:*

```json
{
  "returns": [
    0.02,
    -0.01,
    0.03,
    0.01,
    -0.02,
    0.04,
    0.01,
    -0.03,
    0.02,
    0.03,
    -0.01,
    0.02
  ]
}
```

*Compare portfolio against benchmark:*

```json
{
  "returns": [
    0.02,
    -0.01,
    0.03,
    0.01,
    -0.02,
    0.04
  ],
  "benchmark_returns": [
    0.01,
    -0.005,
    0.02,
    0.015,
    -0.01,
    0.03
  ],
  "risk_free_rate": 0.05
}
```

## Quick Start

```bash
# Via CLI
TOOLROUTER_API_KEY=tr_live_xxx npx -y toolrouter-mcp call financial-calculator dcf_valuation --cash_flows 100,110,121,133,146 --discount_rate 0.1

# Via REST API
curl -H "Authorization: Bearer tr_live_xxx" \
     -d '{"tool":"financial-calculator","skill":"dcf_valuation","input":{"cash_flows":[100,110,121,133,146],"discount_rate":0.1}}' \
     https://api.toolrouter.com/v1/tools/call
```

## Frequently Asked Questions

### Can it value a company with DCF and WACC?

Yes. `dcf_valuation` discounts projected cash flows and terminal value, and `wacc_calculator` builds the discount rate from equity, debt, and CAPM inputs when needed.

### Can it price bonds or solve for yield to maturity?

`bond_pricing` can either price a bond from market rate or solve for YTM from market price, and it also returns duration, convexity, and current yield.

### Can it handle options and Greeks?

`option_pricing` uses Black-Scholes for European options and returns the price plus delta, gamma, theta, vega, and rho.

### Can it calculate loans, time value, and portfolio risk?

Yes. `loan_amortization` builds payment schedules, `time_value` solves for PV, FV, payment, rate, or periods, and `portfolio_metrics` reports Sharpe, Sortino, drawdown, beta, and alpha.

---

## Get Started with ToolRouter

**Already connected?** Call any tool with `use_tool({ tool, skill, input })`. Browse tools with `discover` or visit https://toolrouter.com/llms-full.txt

**New to ToolRouter?** Connect with one command (no API key needed — auto-provisions on first use):

```bash
# MCP (Claude Code, Codex CLI)
claude mcp add toolrouter -- npx -y toolrouter-mcp

# MCP (Cursor, Windsurf, Cline, VS Code, Gemini CLI, Claude Desktop)
{"mcpServers":{"toolrouter":{"command":"npx","args":["-y","toolrouter-mcp"]}}}

# Claude Chat / Claude Cowork / Claude Mobile — add as a connector:
# Settings → Connectors → Add custom connector → URL: https://api.toolrouter.com/mcp

# ChatGPT — add as an app:
# Settings → Apps → Advanced settings → enable Developer mode → Create app → MCP Server URL: https://api.toolrouter.com/mcp

# CLI (works instantly, no restart needed)
npx -y toolrouter-mcp tools                    # browse all tools
npx -y toolrouter-mcp search "seo"             # search by keyword
npx -y toolrouter-mcp call seo analyze_page --url https://example.com
```

Free tools work immediately. For paid tools, visit https://toolrouter.com/claim to add credits.

All platforms: https://toolrouter.com/connect | Full catalog: https://toolrouter.com/llms-full.txt | Docs: https://toolrouter.com/docs