Finance Utilities

Loan Payment

Calculate precise monthly loan payments using standard amortization formulas. Access via MCP in Cursor or Windsurf, or call GET /v1/finance/loan-payment with principal, rate, and term parameters. Returns exact payment amount, total interest, and payment breakdown. Essential for financial planning applications and loan comparison tools.

API Endpoint

GET /v1/finance/loan-payment

Code Examples

curl "https://tinyfn.io/v1/finance/loan-payment" \
  -H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/finance/loan-payment', {
  headers: { 'X-API-Key': 'YOUR_API_KEY' }
});
const data = await response.json();
console.log(data);
import requests

response = requests.get('https://tinyfn.io/v1/finance/loan-payment',
    headers={'X-API-Key': 'YOUR_API_KEY'})
data = response.json()
print(data)

Use via MCP

Add to your AI agent

Connect your AI agent (Claude, Cursor, Windsurf, etc.) to TinyFn's finance tools:

{
  "mcpServers": {
    "tinyfn-finance": {
      "url": "https://tinyfn.io/mcp/finance",
      "headers": {
        "X-API-Key": "YOUR_API_KEY"
      }
    }
  }
}

Learn more about MCP setup →

FAQ

How do I calculate monthly payment for a $300k mortgage at 6.5% APR over 30 years?

Call the endpoint with principal=300000, annual_rate=0.065, and term_months=360. Returns monthly payment of $1896.20 plus total interest and amortization details.

Does the loan payment calculator handle different compounding periods?

Yes, it supports monthly, quarterly, and annual compounding. Specify the compounding_frequency parameter to match your loan terms for accurate calculations.

Can I use this tool in MCP-enabled editors for financial modeling?

Absolutely. In Cursor or Claude Code, the tool integrates directly for loan analysis, mortgage comparisons, and automated financial calculations in your codebase.

What's the difference between this and online loan calculators?

This provides deterministic, API-accessible results perfect for applications. No web scraping needed—get consistent calculations for programmatic use.

Does it return just the payment amount or additional loan details?

Returns comprehensive data: monthly payment, total interest paid, total cost, and optionally full amortization schedule for detailed financial analysis.

Try Loan Payment Now

Get your free API key and start using Loan Payment in seconds.

Get Free API Key