# Fraction Calculator

URL: https://hifreetools.com/calculators/fraction-calculator

> Enter two fractions, pick an operation (+, −, ×, ÷), and this calculator returns the exact answer in lowest terms. It also shows the decimal value and, when the result is larger than 1, the equivalent mixed number — so you can read it however you need.

## Quick answer

To calculate with two fractions, put them over a common denominator for addition or subtraction, multiply straight across for multiplication, or flip the second fraction and multiply for division — then reduce by dividing the numerator and denominator by their greatest common divisor (GCD). For example, 1/2 + 1/3 rewrites as 3/6 + 2/6 = 5/6, which is already in lowest terms and equals about 0.8333. This calculator performs each of those steps automatically and shows the simplified fraction, its decimal, and a mixed number when the value exceeds 1.

## Formula

- a/b ± c/d = (a·d ± c·b) ÷ (b·d)
- a/b × c/d = (a·c) ÷ (b·d)
- a/b ÷ c/d = (a·d) ÷ (b·c)
- Reduce: divide the numerator and denominator by their GCD

The calculator reads four whole numbers — numerator1, denominator1, numerator2, denominator2 — plus the chosen operation. For addition and subtraction it cross-multiplies to a common denominator using (a·d ± c·b)/(b·d); for multiplication it multiplies numerators and denominators straight across; for division it inverts the second fraction and multiplies (multiply by the reciprocal). It then computes the greatest common divisor (GCD) of the resulting numerator and denominator with the Euclidean algorithm and divides both by it, producing a fraction in lowest terms. Finally it derives the decimal by dividing numerator by denominator, and — if the absolute value is 1 or more — converts to a mixed number using integer division and remainder. A zero second fraction is rejected for division because dividing by zero is undefined.

## Inputs

- Numerator 1 (-1000000000000 to 1000000000000); default 1
- Denominator 1 (-1000000000000 to 1000000000000); default 2
- Operation — one of: + Add, − Subtract, × Multiply, ÷ Divide; default add
- Numerator 2 (-1000000000000 to 1000000000000); default 1
- Denominator 2 (-1000000000000 to 1000000000000); default 3

## Worked examples (computed by the page's own function)

- Numerator 1 = 2, Denominator 1 = 3, Operation = add, Numerator 2 = 1, Denominator 2 = 4 → Result (simplified) = 11/12, Decimal = 0.916667  (2/3 + 1/4 = 11/12)
- Numerator 1 = 7, Denominator 1 = 8, Operation = subtract, Numerator 2 = 1, Denominator 2 = 3 → Result (simplified) = 13/24, Decimal = 0.541667  (7/8 − 1/3 = 13/24)
- Numerator 1 = 5, Denominator 1 = 6, Operation = divide, Numerator 2 = 2, Denominator 2 = 3 → Result (simplified) = 5/4, Mixed number = 1 1/4, Decimal = 1.25  (5/6 ÷ 2/3 = 15/12 = 5/4 = 1 1/4)

## Verification

Checked against 17 reference cases (expected values computed independently). Reviewed 2026-10-27. Latest change 2026-10-28: Moved to the schema renderer with a sourced ledger. The operation is a dropdown instead of four buttons; fractions are worked in exact integers (BigInt) with numerators and denominators limited to ±10¹², and decimal inputs such as 1.5 now show an error instead of being cut to 1.

## FAQ

**Does the calculator always simplify the answer?**
Yes. After performing the operation it computes the greatest common divisor (GCD) of the numerator and denominator and divides both by it, so the result is always shown in lowest terms — for example 15/12 is reported as 5/4.

**How does it handle negative fractions?**
Enter a minus sign on the numerator (e.g., −3 over 4 for −3/4). The sign is carried through the arithmetic, and the simplified result keeps a single sign on the numerator, such as −1/2 rather than 1/−2.

**What is a mixed number and when is it shown?**
A mixed number combines a whole number and a proper fraction, like 1 1/4. The calculator shows it whenever the result's absolute value is 1 or greater; for example 5/4 becomes 1 1/4. Proper fractions below 1 stay as a single fraction.

**Can it divide by zero?**
No. A fraction with a denominator of zero, or dividing by a fraction whose numerator is zero, is undefined in mathematics, so the calculator flags it as an error instead of returning a number.

**Why is the decimal sometimes rounded?**
Some fractions are repeating decimals — 5/6 = 0.8333… and 2/3 = 0.6667… — so the decimal display is rounded for readability. The fraction form remains exact, so use it when you need a precise value.

**How do I turn a decimal back into a fraction?**
Write the decimal over a power of ten matching its places, then reduce. For example, 0.75 = 75/100, and dividing both by their GCD of 25 gives 3/4. Terminating decimals always convert to exact fractions this way.


## Sources

- [Khan Academy — Fraction arithmetic](https://www.khanacademy.org/math/arithmetic/fraction-arithmetic)
- [NIST DADS — Euclid's algorithm](https://xlinux.nist.gov/dads/HTML/euclidalgo.html)
- [Wikipedia — Fraction (arithmetic with fractions)](https://en.wikipedia.org/wiki/Fraction)

Runs in the browser; nothing is uploaded. Cite as: HIFreeTools, "Fraction Calculator", https://hifreetools.com/calculators/fraction-calculator
