Fraction Calculator

Add, subtract, multiply, and divide fractions.

Runs locally in your browser

Your inputs are processed locally in your browser and are not uploaded or stored by us.

Fraction 1
Fraction 2

Add, subtract, multiply, and divide fractions using exact integer arithmetic.

How to calculate fractions

  1. Enter the numerator and denominator for the first fraction.
  2. Select your mathematical operation (+, −, ×, ÷).
  3. Enter the numerator and denominator for the second fraction.
  4. The calculator will compute the exact mathematical result and simplify it to its lowest terms.

Fraction Arithmetic Formulas

Addition: a/b + c/d = (ad + bc) / bd Subtraction: a/b − c/d = (ad − bc) / bd Multiplication: a/b × c/d = ac / bd Division: a/b ÷ c/d = ad / bc

The calculator computes the raw fractional result using these exact formulas, then simplifies the answer by dividing both the numerator and denominator by their greatest common divisor.

Adding 1/2 and 1/3

Fraction 11 / 2
Operation+
Fraction 21 / 3
= (1×3 + 1×2) / (2×3) = (3 + 2) / 6
Result: 5 / 6

Notes

  • The calculator preserves exact integer relationships within JavaScript’s safe-integer range.
  • Fraction calculations use safe integer arithmetic. If an intermediate integer operation would exceed JavaScript’s safe-integer range, the calculator rejects the calculation rather than silently returning an approximate fraction.
  • Denominators cannot be zero, and dividing by a zero fraction is invalid.
  • Negative fractions are supported. A negative denominator is automatically normalized so the negative sign appears on the numerator.
  • Your inputs are processed locally in your browser and are not uploaded or stored by us.