← All tool references

Finance · execute

Interest Calculator

Calculate simple or compound interest and visualize how principal grows over time.

Open public tool

Overview

Category
Finance
API mode
execute
Processing
client-side
Privacy
no-data-stored

Public descriptor

The descriptor is available without an API key and supplies this tool’s metadata, schemas, modes, and examples.

GET /api/v1/tools/interest-calculator

View this descriptor as JSON

Execute availability

This tool has an execute route defined by its descriptor. Server-side execution is currently unavailable, so requests return api_not_launched.

POST /api/v1/tools/interest-calculator/execute

Authentication is not issued during the preview. A bearer API key is planned for execution after launch.

Input schema

object object; additional properties are not accepted.

principal · number · required
Enter the amount borrowed or invested before interest, fees, taxes, and future payments.
annual_rate · number · required
Enter the yearly percentage rate: 6.5 means 6.5%.
years · number · required
Enter the number of whole years that interest should accrue.
compounding · string · required
Choose how often interest is added to the balance; this changes the growth calculation. Accepted values: simple, monthly, quarterly, annually.
{
    "type": "object",
    "properties": {
        "principal": {
            "type": "number",
            "description": "Enter the amount borrowed or invested before interest, fees, taxes, and future payments."
        },
        "annual_rate": {
            "type": "number",
            "description": "Enter the yearly percentage rate: 6.5 means 6.5%."
        },
        "years": {
            "type": "number",
            "description": "Enter the number of whole years that interest should accrue."
        },
        "compounding": {
            "type": "string",
            "enum": [
                "simple",
                "monthly",
                "quarterly",
                "annually"
            ],
            "description": "Choose how often interest is added to the balance; this changes the growth calculation."
        }
    },
    "required": [
        "principal",
        "annual_rate",
        "years",
        "compounding"
    ],
    "additionalProperties": false
}

Output schema

On a successful execution, schema values appear in data.result.values.

future_value · number
Value after interest.
interest_earned · number
Future value minus principal.
principal · number
Browser-calculated principal.
{
    "type": "object",
    "properties": {
        "future_value": {
            "type": "number",
            "description": "Value after interest."
        },
        "interest_earned": {
            "type": "number",
            "description": "Future value minus principal."
        },
        "principal": {
            "type": "number",
            "description": "Browser-calculated principal."
        }
    },
    "additionalProperties": false
}

Interest Calculator: Monthly compounding

The request body follows the published input schema. The response below shows the success-envelope shape returned after execution is available.

curl -X POST "https://utilitypages.org/api/v1/tools/interest-calculator/execute" \
  -H "Content-Type: application/json" \
  -d '{
    "principal": 10000,
    "annual_rate": 5,
    "years": 5,
    "compounding": "monthly"
}'
{
    "ok": true,
    "data": {
        "slug": "interest-calculator",
        "result": {
            "values": {
                "future_value": 12833.59000000000014551915228366851806640625,
                "interest_earned": 2833.59000000000014551915228366851806640625
            },
            "display": {
                "display": "12833.59"
            },
            "warnings": [],
            "assumptions": [],
            "steps": []
        }
    },
    "meta": [],
    "request_id": "req_example_123"
}

Errors

api_not_launched · 503
Returned by the current launch gate for every execute request.
invalid_json · 400
Returned when an enabled execute request does not contain valid JSON.
validation_failed · 422
Returned when a request does not satisfy the input schema.
browser_interaction_required · 422
Returned for browser capability tools instead of inventing a server-side result.
tool_not_found · 404
Returned when a requested descriptor slug does not exist.
execution_failed · 503
Returned when an enabled server-side execution cannot complete.