Home › Math › Fraction Calculator
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.
When to use
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).
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.
Inputs
| Parameter | Type | Unit | Required | Description |
|---|---|---|---|---|
fraction_a | string | yes | 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 | yes | Second operand in the same formats. | |
operation | enum: add | subtract | multiply | divide | default add | Operation applied as fraction_a (operation) fraction_b. |
Outputs
| Output | 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. |
Example
3/4 + 1/6: {"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: {"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
Machine access
- API:
GET https://tttkmbb.com/api/v1/calculate/fraction-arithmetic(query parameters) orPOSTwith a JSON body{"inputs": {...}} - Schema: https://tttkmbb.com/api/v1/calculators/fraction-arithmetic · Markdown: https://tttkmbb.com/math/fraction-arithmetic.md · JSON definition: https://tttkmbb.com/math/fraction-arithmetic.json
- MCP: server
https://tttkmbb.com/mcp, toolcalculate_fraction_arithmetic - OpenAPI operationId:
calculate_fraction_arithmetic - Freshness:
static. Authentication: none. Rate limit: fair use (see rate limits).
Sources
- Wikipedia – Fraction – arithmetic with fractions (reference)
- Wikipedia – Lowest common denominator (reference)
- Wolfram MathWorld – Fraction (reference)
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 calculators
- Fraction Simplifier — Reduce a single fraction or convert it to decimal and percent.
- GCD and LCM Calculator — The LCM used as common denominator and the GCD used to reduce.
- Ratio Calculator — Simplify a ratio a:b, including decimal terms.