Fraction Calculator

Add, subtract, multiply and divide fractions with exact integer reduction.

  • Runs locally in your browser
  • No upload required

Try it

Reduced fraction
5/6
Decimal
0.833333333333
Mixed number
—
Formula
1/2 + 1/3 = 5/6

Supported formats

Input
number, select
Output
number, text

Privacy

Runs entirely in your browser. Your input is never uploaded, stored, or sent to a third party.

Processing
In your browser
Privacy level
Browser only

1/2 + 1/3 = 5/6.

How it works

  • Expressed both operands over a common denominator (or multiplied straight across for × and ÷).
  • Combined the numerators with exact integer arithmetic.
  • Reduced the result by the greatest common divisor so the fraction is in lowest terms.
  • Reported the decimal equivalent to 12 significant digits.
textSelect to copy
1/2 + 1/3 = 5/6
  • Reduction uses the Euclidean algorithm, so the result is an exact lowest-terms fraction.
  • The result is a proper fraction (|numerator| < denominator).

Methodology

  1. Represent each operand as an exact integer pair (numerator, denominator).
  2. For + and −, cross-multiply to a common denominator; for × and ÷, multiply or invert-and-multiply.
  3. Reduce the result with the Euclidean greatest-common-divisor algorithm and keep the denominator positive.
  4. Round the decimal quotient to 12 significant digits; the reduced fraction carries the exact value.

Usage

  1. Choose the operation (add, subtract, multiply, divide or simplify).
  2. Enter the numerator and denominator of each fraction.
  3. Read the reduced fraction, its decimal and its mixed-number form.

Examples

These are examples, not current values: they use fixed inputs, while the interactive tool computes live results in your browser.

1/2 + 1/3

jsonSelect to copy
{
  "op": "add",
  "aNumerator": 1,
  "aDenominator": 2,
  "bNumerator": 1,
  "bDenominator": 3
}

3/4 − 1/6

jsonSelect to copy
{
  "op": "subtract",
  "aNumerator": 3,
  "aDenominator": 4,
  "bNumerator": 1,
  "bDenominator": 6
}

2/3 × 3/4

jsonSelect to copy
{
  "op": "multiply",
  "aNumerator": 2,
  "aDenominator": 3,
  "bNumerator": 3,
  "bDenominator": 4
}

1/2 ÷ 3/4

jsonSelect to copy
{
  "op": "divide",
  "aNumerator": 1,
  "aDenominator": 2,
  "bNumerator": 3,
  "bDenominator": 4
}

Simplify 8/12

jsonSelect to copy
{
  "op": "simplify",
  "aNumerator": 8,
  "aDenominator": 12
}

Limitations

Exact arithmetic, not floating point

Decimal arithmetic cannot represent 1/3 exactly, so adding thirds accumulates error. Working with integer numerator/denominator pairs and reducing by the greatest common divisor keeps the answer exact.

The only approximation is the optional decimal display, which is rounded to 12 significant digits; the fraction itself is always exact.

Frequently asked questions

How is 1/2 + 1/3 computed exactly?
Over the common denominator 6: 1/2 = 3/6 and 1/3 = 2/6, so the sum is 5/6. The tool forms (1×3 + 1×2)/6 with integers, then reduces by the greatest common divisor.
Does simplifying a fraction change its value?
No. Dividing the numerator and denominator by their greatest common divisor produces an equivalent fraction in lowest terms; only the representation changes.
What is an improper fraction?
A fraction whose numerator is larger than its denominator, such as 7/6. It is equal to the mixed number 1 1/6, which the tool also reports.

Sources

  1. ISO 80000-2:2019 Quantities and units — Part 2: Mathematics — ISO
  2. MDN Web Docs — Number.isInteger() — MDN