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

# Fraction Calculator

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

## Request

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

Add, subtract, multiply or divide two fractions, mixed numbers included, and get the answer reduced to lowest terms. The arithmetic is exact whole-number arithmetic, so nothing is rounded through a decimal on the way, and the result comes back as a fraction, a mixed number and a decimal.

## Request body

- object
  - `a` object
    - `numerator` integer
    - `denominator` integer
  - `b` object
    - `numerator` integer
    - `denominator` integer
  - `operation` string

## Response `200`

Successful result

- object
  - `ok` boolean
  - `data` object
    - `numerator` integer
    - `denominator` integer
    - `fraction` string
    - `mixed` string
    - `decimal` number
    - `expression` 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)
