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/sequence-of-returns-calculator
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/sequence-of-returns-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.
starting_balance· number · required- Enter starting balance.
annual_withdrawal· number · required- Enter first-year withdrawal.
annual_returns· string · required- Enter annual returns.
{
"type": "object",
"properties": {
"starting_balance": {
"type": "number",
"description": "Enter starting balance."
},
"annual_withdrawal": {
"type": "number",
"description": "Enter first-year withdrawal."
},
"annual_returns": {
"type": "string",
"description": "Enter annual returns."
}
},
"required": [
"starting_balance",
"annual_withdrawal",
"annual_returns"
],
"additionalProperties": false
}
Output schema
On a successful execution, schema values appear in data.result.values.
ending_balance· number- Ending balance produced by the tool.
total_withdrawals· number- Total withdrawals produced by the tool.
lowest_balance· number- Lowest balance produced by the tool.
schedule· array- Annual path produced by the tool.
{
"type": "object",
"properties": {
"ending_balance": {
"type": "number",
"description": "Ending balance produced by the tool."
},
"total_withdrawals": {
"type": "number",
"description": "Total withdrawals produced by the tool."
},
"lowest_balance": {
"type": "number",
"description": "Lowest balance produced by the tool."
},
"schedule": {
"type": "array",
"description": "Annual path produced by the tool."
}
},
"additionalProperties": false
}
Sequence of Returns 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/sequence-of-returns-calculator/execute" \
-H "Content-Type: application/json" \
-d '{
"starting_balance": 500000,
"annual_withdrawal": 24000,
"annual_returns": "12, -18, 8, 5, -4, 10, 7, 3"
}'
{
"ok": true,
"data": {
"slug": "sequence-of-returns-calculator",
"result": {
"values": {
"ending_balance": 381774.98999999999068677425384521484375,
"total_withdrawals": 192000,
"lowest_balance": 381124.3300000000162981450557708740234375,
"schedule": [
{
"year": 1,
"return_percent": 12,
"withdrawal": 24000,
"ending_balance": 533120
},
{
"year": 2,
"return_percent": -18,
"withdrawal": 24000,
"ending_balance": 417478.400000000023283064365386962890625
},
{
"year": 3,
"return_percent": 8,
"withdrawal": 24000,
"ending_balance": 424956.6699999999837018549442291259765625
},
{
"year": 4,
"return_percent": 5,
"withdrawal": 24000,
"ending_balance": 421004.51000000000931322574615478515625
},
{
"year": 5,
"return_percent": -4,
"withdrawal": 24000,
"ending_balance": 381124.3300000000162981450557708740234375
},
{
"year": 6,
"return_percent": 10,
"withdrawal": 24000,
"ending_balance": 392836.76000000000931322574615478515625
},
{
"year": 7,
"return_percent": 7,
"withdrawal": 24000,
"ending_balance": 394655.3300000000162981450557708740234375
},
{
"year": 8,
"return_percent": 3,
"withdrawal": 24000,
"ending_balance": 381774.98999999999068677425384521484375
}
]
},
"display": {
"display": "381774.99"
},
"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.