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

# Ratio Calculator

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

## Request

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

Reduce a ratio to lowest whole-number terms, solve a proportion A:B = C:D for the one value left out, or scale a ratio by a factor for a recipe or a mix. Reducing is exact whole-number arithmetic, so a ratio written with decimals is scaled to integers first rather than rounded.

## Request body

- object
  - `mode` string
  - `a` integer
  - `b` integer
  - `c` integer
  - `d` integer
  - `factor` number

## Response `200`

Successful result

- object
  - `ok` boolean
  - `data` object
    - `mode` string
    - `a` integer
    - `b` integer
    - `ratio` string
    - `decimal` number
    - `solvedFor` unknown
    - `solved` unknown

## 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)
