---
title: "ROI Calculator"
method: POST
path: "/api/v1/tools/roi-calculator"
tags: ["tools"]
---

# ROI Calculator

`POST /api/v1/tools/roi-calculator`

## Request

- Base URL: `https://toolforte.com`
- URL: `https://toolforte.com/api/v1/tools/roi-calculator`
- Auth: HTTP bearer

Return on investment from the amount invested and the total amount that came back: the gain, the ROI in percent and, when a holding period in years is given, the annualised return. An estimate, not financial advice.

## Request body

- object
  - `invested` integer
  - `returned` integer
  - `years` integer

## Response `200`

Successful result

- object
  - `ok` boolean
  - `data` object
    - `invested` integer
    - `returned` integer
    - `gain` integer
    - `roiPercent` integer
    - `years` integer
    - `annualisedPercent` number
    - `note` string

## Other responses

- `400`: Missing or invalid request fields
- `401`: Invalid or missing API key
- `429`: Monthly plan limit reached

---

[API](https://skmtc.dev/toolforte/apis/toolforte-api.md) · [All operations](https://skmtc.dev/toolforte/apis/toolforte-api/llms.txt) · [OpenAPI document](https://skmtc.dev/toolforte/apis/toolforte-api/revisions/4d814d484dfc?raw)
