Loan, savings and investment maths

Compute loan payments, amortisation schedules, future and present values, NPV and IRR with exact arithmetic.

CHF 0.003 / callCall itTry it
Thomas arithmometer, ca. 1820
Thomas arithmometerca. 1820

Details

Operations:

- payment: level payment per period. Needs principal, annual_rate_percent, years (or periods).

- schedule: payment, interest and balance per period, rounded to cents like a bank statement (max 1200 periods).

- future_value: needs present_value and/or contribution per period, annual_rate_percent, years.

- present_value: needs future_value, annual_rate_percent, years.

- npv: needs rate_percent per period and cashflows (the first at time 0).

- irr: needs cashflows; returns percent per period.

periods_per_year defaults to 12. Not advice: formulas only.

Price: CHF 0.003 per call (first 100 calls per day free).

Example: {"operation":"payment","principal":"500000","annual_rate_percent":"1.8","years":25} → "2070.93" per month.

Call it

REST
curl -X POST https://api.tausendwerk.xyz/v1/finance \
  -H "Content-Type: application/json" \
  -d '{"operation":"payment","principal":"500000","annual_rate_percent":"1.8","years":25}'
MCP tool name
finance

After the free 100 calls per day, add a key: Authorization: Bearer tw_live_…. Pricing

Try it

Runs against the live API with the free allowance.

Input schema JSON Schema
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "operation"
  ],
  "properties": {
    "operation": {
      "type": "string",
      "enum": [
        "payment",
        "schedule",
        "future_value",
        "present_value",
        "npv",
        "irr"
      ]
    },
    "principal": {
      "type": [
        "string",
        "number"
      ],
      "description": "A number. Send a string such as \"0.1\" to keep it exact."
    },
    "annual_rate_percent": {
      "type": [
        "string",
        "number"
      ],
      "description": "A number. Send a string such as \"0.1\" to keep it exact."
    },
    "rate_percent": {
      "type": [
        "string",
        "number"
      ],
      "description": "A number. Send a string such as \"0.1\" to keep it exact."
    },
    "years": {
      "type": "number",
      "exclusiveMinimum": 0,
      "maximum": 100
    },
    "periods": {
      "type": "integer",
      "minimum": 1,
      "maximum": 1200
    },
    "periods_per_year": {
      "type": "integer",
      "minimum": 1,
      "maximum": 365,
      "default": 12
    },
    "present_value": {
      "type": [
        "string",
        "number"
      ],
      "description": "A number. Send a string such as \"0.1\" to keep it exact."
    },
    "future_value": {
      "type": [
        "string",
        "number"
      ],
      "description": "A number. Send a string such as \"0.1\" to keep it exact."
    },
    "contribution": {
      "type": [
        "string",
        "number"
      ],
      "description": "A number. Send a string such as \"0.1\" to keep it exact."
    },
    "cashflows": {
      "type": "array",
      "items": {
        "type": [
          "string",
          "number"
        ],
        "description": "A number. Send a string such as \"0.1\" to keep it exact."
      },
      "minItems": 2,
      "maxItems": 1200
    },
    "decimals": {
      "type": "integer",
      "minimum": 0,
      "maximum": 100,
      "description": "Round the result to this many decimal places."
    },
    "significant": {
      "type": "integer",
      "minimum": 1,
      "maximum": 60,
      "default": 30,
      "description": "Significant digits for non-terminating results. Default 30."
    },
    "round_to": {
      "type": "string",
      "pattern": "^\\d*\\.?\\d+$",
      "description": "Round to a multiple of this step, e.g. \"0.05\" for Swiss cash rounding."
    },
    "rounding": {
      "type": "string",
      "enum": [
        "half_up",
        "half_even",
        "half_down",
        "up",
        "down",
        "toward_zero",
        "away_from_zero"
      ],
      "description": "Rounding mode for decimals and round_to. Default half_up."
    }
  },
  "examples": [
    {
      "operation": "payment",
      "principal": "500000",
      "annual_rate_percent": "1.8",
      "years": 25
    }
  ]
}

More in Exact maths and money