Tools / Financial Calculator
Financial Calculator icon

Financial Calculator

DCF, bonds, options & portfolios

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).

7 skillsv0.01
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.

Returns: Enterprise value with per-year present values, terminal value breakdown, and implied value composition
Parameters
cash_flows *arrayProjected future cash flows, one per year (e.g. [100, 110, 121, 133, 146])
discount_rate *numberWACC or required rate of return as a decimal (e.g. 0.10 for 10%)
terminal_growth_ratenumberPerpetuity growth rate for terminal value (default: 0.025 = 2.5%). Must be less than discount_rate.
terminal_methodstringTerminal value method: "perpetuity" (Gordon Growth, default) or "exit_multiple" (10x final cash flow)
Example
Value a company with 5 years of projected cash flows at 10% discount rate
curl -H "Authorization: Bearer $TOOLROUTER_API_KEY" \
  -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
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).

Returns: WACC with capital structure weights, cost components, tax shield, and optional CAPM breakdown
Parameters
equity_value *numberMarket value of equity (market cap)
debt_value *numberMarket value of debt
cost_of_equitynumberRequired return on equity as a decimal (e.g. 0.10 for 10%). Omit if providing CAPM inputs.
cost_of_debt *numberPre-tax cost of debt as a decimal (e.g. 0.05 for 5%)
tax_rate *numberCorporate tax rate as a decimal (e.g. 0.21 for 21%)
betanumberEquity beta for CAPM calculation (e.g. 1.2)
risk_free_ratenumberRisk-free rate for CAPM (e.g. 0.04 for 4%)
market_premiumnumberEquity risk premium (Rm - Rf) for CAPM (e.g. 0.06 for 6%)
Example
Calculate WACC with known cost of equity
curl -H "Authorization: Bearer $TOOLROUTER_API_KEY" \
  -d '{
  "tool": "financial-calculator",
  "skill": "wacc_calculator",
  "input": {
    "equity_value": 800,
    "debt_value": 200,
    "cost_of_equity": 0.1,
    "cost_of_debt": 0.05,
    "tax_rate": 0.21
  }
}' \
  https://api.toolrouter.com/v1/tools/call
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.

Returns: Bond price, YTM, current yield, Macaulay duration, modified duration, convexity, premium/discount status, and total cash flows
Parameters
face_value *numberPar/face value of the bond (e.g. 1000)
coupon_rate *numberAnnual coupon rate as a decimal (e.g. 0.05 for 5%)
years_to_maturity *numberYears until the bond matures
market_ratenumberRequired market yield/discount rate as a decimal. Provide this to calculate bond price.
market_pricenumberCurrent market price of the bond. Provide this instead of market_rate to solve for YTM.
frequencynumberCoupon payments per year: 1 (annual), 2 (semi-annual, default), 4 (quarterly), 12 (monthly)
Example
Price a 5% semi-annual bond at 6% market rate
curl -H "Authorization: Bearer $TOOLROUTER_API_KEY" \
  -d '{
  "tool": "financial-calculator",
  "skill": "bond_pricing",
  "input": {
    "face_value": 1000,
    "coupon_rate": 0.05,
    "years_to_maturity": 10,
    "market_rate": 0.06
  }
}' \
  https://api.toolrouter.com/v1/tools/call
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.

Returns: Option price, all five Greeks, intrinsic/time value decomposition, put-call parity prices, and Black-Scholes model intermediates
Parameters
spot_price *numberCurrent price of the underlying asset
strike_price *numberOption strike price
time_to_expiry *numberTime to expiration in years (e.g. 0.5 for 6 months, 0.25 for 3 months)
risk_free_rate *numberRisk-free interest rate as a decimal (e.g. 0.05 for 5%)
volatility *numberAnnualized volatility as a decimal (e.g. 0.25 for 25%)
option_typestringOption type: "call" (default) or "put"
dividend_yieldnumberContinuous dividend yield as a decimal (e.g. 0.02 for 2%). Default: 0.
Example
Price a call option on a $100 stock
curl -H "Authorization: Bearer $TOOLROUTER_API_KEY" \
  -d '{
  "tool": "financial-calculator",
  "skill": "option_pricing",
  "input": {
    "spot_price": 100,
    "strike_price": 105,
    "time_to_expiry": 0.5,
    "risk_free_rate": 0.05,
    "volatility": 0.25
  }
}' \
  https://api.toolrouter.com/v1/tools/call
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.

Returns: Payment schedule with per-period principal/interest breakdown, loan summary, and optional accelerated payoff comparison
Parameters
principal *numberLoan amount (e.g. 300000)
annual_rate *numberAnnual interest rate as a decimal (e.g. 0.065 for 6.5%)
years *numberLoan term in years (e.g. 30)
frequencystringPayment frequency: "monthly" (default), "biweekly", or "weekly"
extra_paymentnumberAdditional payment per period above the standard payment (e.g. 200)
Example
Monthly amortization for a $300K mortgage at 6.5%
curl -H "Authorization: Bearer $TOOLROUTER_API_KEY" \
  -d '{
  "tool": "financial-calculator",
  "skill": "loan_amortization",
  "input": {
    "principal": 300000,
    "annual_rate": 0.065,
    "years": 30
  }
}' \
  https://api.toolrouter.com/v1/tools/call
Time Value of Money

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.

Returns: The solved variable with full calculation breakdown, total payments, and interest earned/paid
Parameters
calculation *stringWhich variable to solve for
present_valuenumberPresent value (lump sum or loan amount)
future_valuenumberFuture value (target amount)
ratenumberInterest rate per period as a decimal (e.g. 0.005 for 0.5% monthly)
periodsnumberNumber of compounding periods
paymentnumberPeriodic payment amount (for annuities)
payment_timingstringWhen payments occur: "end" (ordinary annuity, default) or "beginning" (annuity due)
Example
How much will $10,000 grow to in 20 years at 7% annually?
curl -H "Authorization: Bearer $TOOLROUTER_API_KEY" \
  -d '{
  "tool": "financial-calculator",
  "skill": "time_value",
  "input": {
    "calculation": "future_value",
    "present_value": 10000,
    "rate": 0.07,
    "periods": 20
  }
}' \
  https://api.toolrouter.com/v1/tools/call
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.

Returns: Comprehensive risk/return analytics with Sharpe, Sortino, drawdown, skewness, kurtosis, and optional benchmark comparison metrics
Parameters
returns *arrayArray of periodic returns as decimals (e.g. monthly: [0.02, -0.01, 0.03, ...])
benchmark_returnsarrayBenchmark returns for the same periods, same length as returns (for beta, alpha, tracking error)
risk_free_ratenumberAnnualized risk-free rate as a decimal (default: 0.04 = 4%). Auto-converted to periodic.
Example
Analyze 12 months of portfolio returns
curl -H "Authorization: Bearer $TOOLROUTER_API_KEY" \
  -d '{
  "tool": "financial-calculator",
  "skill": "portfolio_metrics",
  "input": {
    "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
    ]
  }
}' \
  https://api.toolrouter.com/v1/tools/call
Loading reviews...
Loading activity...
v0.012026-03-22
  • Initial release with 7 skills: dcf_valuation, wacc_calculator, bond_pricing, option_pricing, loan_amortization, time_value, portfolio_metrics

Quick Start

MCP (Claude Code)
claude mcp add --transport stdio \
  --env TOOLROUTER_API_KEY=YOUR_API_KEY \
  toolrouter -- npx -y toolrouter-mcp
REST API
curl -H "Authorization: Bearer $TOOLROUTER_API_KEY" \
  -d '{"tool":"financial-calculator","skill":"dcf_valuation","input":{}}' \
  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.