← All tool references

Finance · not_available

IRR Calculator

Estimate internal rate of return from periodic cash flows.

Open public tool

Overview

Category
Finance
API mode
not_available
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/irr-calculator

View this descriptor as JSON

Execute availability

This tool is documented as a browser capability. Its execute route does not produce a server-side result; when execution is enabled, it responds with browser_interaction_required and points callers to the public tool page.

POST /api/v1/tools/irr-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.

cash_flows · string · required
Enter periodic cash flows separated by commas, beginning with the initial investment.
{
    "type": "object",
    "properties": {
        "cash_flows": {
            "type": "string",
            "description": "Enter periodic cash flows separated by commas, beginning with the initial investment."
        }
    },
    "required": [
        "cash_flows"
    ],
    "additionalProperties": false
}

Output schema

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

irr · number
IRR per period calculated by the tool.
npv_at_irr · number
NPV at IRR calculated by the tool.
period_count · number
Cash-flow periods calculated by the tool.
cash_flow_table · array
Cash-flow timeline calculated by the tool.
{
    "type": "object",
    "properties": {
        "irr": {
            "type": "number",
            "description": "IRR per period calculated by the tool."
        },
        "npv_at_irr": {
            "type": "number",
            "description": "NPV at IRR calculated by the tool."
        },
        "period_count": {
            "type": "number",
            "description": "Cash-flow periods calculated by the tool."
        },
        "cash_flow_table": {
            "type": "array",
            "description": "Cash-flow timeline calculated by the tool."
        }
    },
    "additionalProperties": false
}

IRR Calculator worked example

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/irr-calculator/execute" \
  -H "Content-Type: application/json" \
  -d '{
    "cash_flows": "-10000, 2500, 3000, 3500, 4000"
}'
{
    "ok": true,
    "data": {
        "slug": "irr-calculator",
        "result": {
            "values": {
                "irr": 10.4845290000000002095248419209383428096771240234375,
                "npv_at_irr": 0,
                "period_count": 4,
                "cash_flow_table": [
                    {
                        "period": 0,
                        "cash_flow": -10000
                    },
                    {
                        "period": 1,
                        "cash_flow": 2500
                    },
                    {
                        "period": 2,
                        "cash_flow": 3000
                    },
                    {
                        "period": 3,
                        "cash_flow": 3500
                    },
                    {
                        "period": 4,
                        "cash_flow": 4000
                    }
                ]
            },
            "display": {
                "display": "10.484529"
            },
            "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.