# Fraction Calculator

> Adds, subtracts, multiplies or divides two fractions, mixed numbers, whole numbers or decimals with exact integer arithmetic, returning the result in lowest terms, as a mixed number and as a decimal, with the intermediate steps.

- Calculator id: `fraction-arithmetic` · Category: Math (`math`) · Tool name: `calculate_fraction_arithmetic`
- Canonical page: https://tttkmbb.com/math/fraction-arithmetic · This document: https://tttkmbb.com/math/fraction-arithmetic.md · JSON definition: https://tttkmbb.com/math/fraction-arithmetic.json

## Purpose

Adds, subtracts, multiplies or divides two fractions, mixed numbers, whole numbers or decimals with exact integer arithmetic, returning the result in lowest terms, as a mixed number and as a decimal, with the intermediate steps.

**Use when:** You need an exact result of an operation on two fractions (e.g. 3/4 + 1/6), including mixed numbers such as 1 1/2, rather than a rounded decimal.

**Do not use when:** You only want to reduce a single fraction or convert it to a decimal or percent (use fraction-simplifier), or you need the least common denominator of several denominators (use gcd-lcm).

## Input

| Parameter | Type | Unit | Required | Description |
| --- | --- | --- | --- | --- |
| `fraction_a` | string |  | required | First operand: a fraction '3/4', a mixed number '1 1/2' or '-1 1/2', a whole number '5' or a decimal '0.75'. |
| `fraction_b` | string |  | required | Second operand in the same formats. |
| `operation` | enum: add \| subtract \| multiply \| divide |  | optional, default "add" | Operation applied as fraction_a (operation) fraction_b. |

## Output

| Field | Type | Unit | Description |
| --- | --- | --- | --- |
| `result` | string |  | Exact result in lowest terms with the sign in the numerator, e.g. '11/12' (a whole number when the denominator reduces to 1). |
| `mixed_number` | string |  | Result as whole part plus proper fraction, e.g. '1 1/2'. |
| `numerator` | integer |  | Numerator of the reduced result. |
| `denominator` | integer |  | Denominator of the reduced result (always positive). |
| `decimal` | number |  | numerator / denominator. |
| `working` | string |  | Steps: operands in lowest terms, the common-denominator or reciprocal step, the unreduced result and the reduced result. |

## Formula

`a/b + c/d = (a·(L/b) + c·(L/d)) / L with L = lcm(b, d), a/b − c/d likewise; a/b × c/d = (a·c) / (b·d); a/b ÷ c/d = (a·d) / (b·c); the result is divided by gcd(numerator, denominator)`

Operands are parsed to exact integer numerators and denominators (a decimal becomes k/10^n) and combined with arbitrary-precision integers, so the fraction outputs are exact for any input size; only the decimal output is rounded.

## Data Sources

- Wikipedia – Fraction – arithmetic with fractions — https://en.wikipedia.org/wiki/Fraction#Arithmetic_with_fractions (reference, retrieved 2026-09-24)
- Wikipedia – Lowest common denominator — https://en.wikipedia.org/wiki/Lowest_common_denominator (reference, retrieved 2026-09-24)
- Wolfram MathWorld – Fraction — https://mathworld.wolfram.com/Fraction.html (reference, retrieved 2026-09-24)

Data freshness: `static`. Deterministic formula with fixed constants; results never go stale. Inputs supplied by the caller determine the output.

## API

- `GET https://tttkmbb.com/api/v1/calculate/fraction-arithmetic?fraction_a=…&fraction_b=…`
- `POST https://tttkmbb.com/api/v1/calculate/fraction-arithmetic` with JSON body `{"inputs": {…}}`
- Response: unified envelope (`success`, `request`, `result.values`, `result.units`, `sources`, `freshness`, `timestamp`, `next_actions`, `links`); see https://tttkmbb.com/docs/response-format.md
- Schema: https://tttkmbb.com/api/v1/calculators/fraction-arithmetic · OpenAPI operationId `calculate_fraction_arithmetic` in https://tttkmbb.com/openapi.json
- Authentication: none. Rate limit: fair use, see https://tttkmbb.com/docs/rate-limits.md.

## MCP

- Server: `https://tttkmbb.com/mcp` (Streamable HTTP, JSON-RPC 2.0, no auth)
- Tool: `calculate_fraction_arithmetic` (dedicated) or `run_calculator` with `{"calculator_id": "fraction-arithmetic", "inputs": {…}}`

## Example

- 3/4 + 1/6: inputs `{"fraction_a":"3/4","fraction_b":"1/6","operation":"add"}` → `{"result":"11/12","mixed_number":"11/12","numerator":11,"denominator":12,"decimal":0.916667,"working":"3/4 + 1/6 = 9/12 + 2/12 = 11/12"}`
- 2 1/3 − 5/6: inputs `{"fraction_a":"2 1/3","fraction_b":"5/6","operation":"subtract"}` → `{"result":"3/2","mixed_number":"1 1/2","numerator":3,"denominator":2,"decimal":1.5,"working":"7/3 − 5/6 = 14/6 − 5/6 = 9/6 = 3/2"}`

```
GET https://tttkmbb.com/api/v1/calculate/fraction-arithmetic?fraction_a=3%2F4&fraction_b=1%2F6&operation=add
```

## Limitations

You only want to reduce a single fraction or convert it to a decimal or percent (use fraction-simplifier), or you need the least common denominator of several denominators (use gcd-lcm). Operands are parsed to exact integer numerators and denominators (a decimal becomes k/10^n) and combined with arbitrary-precision integers, so the fraction outputs are exact for any input size; only the decimal output is rounded. All values are computed from the formula above; no measurement or live data is involved.

## FAQ

**How do I enter a negative mixed number?**

Put the sign in front of the whole part: '-1 1/2' means −(1 + 1/2) = −3/2. A sign on the numerator or denominator of a plain fraction ('-3/4' or '3/-4') is also accepted.

**Can I enter decimals?**

Yes. A decimal such as 0.75 is converted exactly to 75/100 = 3/4 before the operation, so 0.75 + 1/6 gives 11/12.

**Why is the working shown with a common denominator?**

Addition and subtraction use the least common denominator L = lcm(b, d), e.g. 3/4 + 1/6 = 9/12 + 2/12; multiplication and division do not need one.

## Related

- [Fraction Simplifier](https://tttkmbb.com/math/fraction-simplifier.md) — Reduce a single fraction or convert it to decimal and percent.
- [GCD and LCM Calculator](https://tttkmbb.com/math/gcd-lcm.md) — The LCM used as common denominator and the GCD used to reduce.
- [Ratio Calculator](https://tttkmbb.com/math/ratio.md) — Simplify a ratio a:b, including decimal terms.
