Fraction calculator

First fraction
Second fraction

Whole numbers; use − for a negative value. Denominators cannot be zero.

How the fractions are calculated

Enter a whole number in each numerator and denominator. A negative numerator or denominator changes the sign of that fraction. Neither denominator can be zero; when dividing, the second fraction must also be nonzero.

Exact fractions keeps the integer ratio throughout the calculation. The result uses a positive denominator and is reduced by the greatest common divisor. Choose Fraction, Mixed or Decimal at the result to change its presentation. Copy value keeps the full value.

Add or subtract
Write both fractions over a common denominator, then add or subtract the scaled numerators.
Multiply
Multiply numerators and denominators. Cancel shared factors before forming large products.
Divide
Multiply the first fraction by the reciprocal of the second, then cancel common factors.

The steps above use your own calculation’s operands and reductions. Changing an input or a calculation setting clears them until you calculate again. Standard arithmetic uses decimal approximations; it does not promise an exact rational answer.

Worked example: 2/3 + 5/6

Six is a common denominator. Multiply the numerator and denominator of 2/3 by 2 to get 4/6. Then 4/6 + 5/6 = 9/6. Divide both 9 and 6 by their greatest common divisor, 3: the answer is 3/2, or 1 1/2.

Load example fills these values without calculating. Choose Calculate to see their result and steps.

More expressions and reference

For brackets, longer expressions, mixed numbers or repeating decimals, open the scientific calculator. Its Tools workspace keeps the free-expression Exact arithmetic form and related number tools. The precision and syntax guide explains the supported notation and calculation limits.

Reference: the Python Software Foundation’s Python 3.14 rational-number documentation describes signed integer ratios, nonzero denominators and reduction to lowest terms. This page’s method and worked example are original; the reference is not the calculator’s engine. Checked 1 November 2026.

All calculators