OmniTools
mathDifficulty: 3/5

Fraction Calculator

Exact fraction arithmetic with automatic simplification, mixed numbers, and recurring decimals shown exactly rather than rounded.

A fraction, a mixed number, a decimal, or a whole number.

Operation

a/b + c/d

a/b − c/d

a/b × c/d

a/b ÷ c/d

Exact, not floating point: Every value is held as a pair of arbitrary-precision integers, so one third plus one third plus one third is exactly one, not 0.9999999999999998. Results are always reduced to lowest terms, a zero denominator is refused rather than becoming Infinity, and dividing by a zero fraction is an error rather than NaN. Where a decimal cannot be written exactly, that is stated instead of being hidden behind rounding.

How it works

  1. Enter each value as a fraction (3/4), a mixed number (1 1/2), a decimal (0.75), or a whole number.
  2. Choose an operation.
  3. The exact answer, its mixed-number form and its decimal expansion are computed in your browser.
Privacy & Processing: Everything runs in your browser. Nothing you enter is uploaded, stored, or sent to analytics.

Frequently Asked Questions

Why is exact arithmetic important here?

Because floating point cannot represent most fractions. In floating point 0.1 + 0.2 is 0.30000000000000004 and a third plus a third plus a third is 0.9999999999999998. This calculator uses arbitrary-precision integers for the numerator and denominator, so those come out as exactly 3/10 and exactly 1.

What input forms are accepted?

Simple fractions like 3/4, mixed numbers like 1 1/2, negatives like -2 3/4 (which is -11/4, not -2 + 3/4), whole numbers, and decimals like 0.75 — which are read as exact fractions, so 0.1 becomes exactly 1/10.

How are recurring decimals shown?

Exactly, using bracket notation: 1/3 is 0.(3) and 1/7 is 0.(142857). The repeating block is detected by long division rather than rounded off, so nothing is lost.

What happens if I divide by zero?

It is refused with a clear message. A zero denominator has no value, so returning Infinity or NaN would just move the problem further down the page.

Related Tools