Fraction operations use arbitrary-precision integers (BigInt) in your browser. This page summarizes the calculation rules so you can check a result yourself.
Exact fractions
Every fraction is normalized: the denominator stays positive, and the numerator and denominator are divided by their greatest common divisor. For example, 18/24 is shown as 3/4. Zero has a single form, 0/1. A zero denominator or a division by zero produces an error, not a result.
Inputs and limits
The main calculator accepts signed integers, fractions, terminating decimals, repeating decimals written in parentheses, and mixed numbers. The engine’s limits are:
- A number can have up to 100 digits.
- A chain of additions, subtractions, products or quotients takes 2 to 20 values; the mean takes up to 50.
- A result can have up to 10,000 digits in the numerator or the denominator.
- A typed expression can have up to 1,024 characters, 200 elements and 20 levels of nesting.
An input outside those limits is rejected with a message; it is never shortened or rounded silently. Specialized tools state their own limits next to their fields.
Rounding and decimals
The reduced fraction is the exact result. To show it as a decimal, the engine follows these rules:
- If the decimal ends or repeats within the digits shown, it is written in full and marked as exact; a repeating part is shown in parentheses, as in 1/3 = 0.(3).
- If it does not fit, the decimal is rounded and marked as approximate. Rounding goes to the nearest value, and ties move away from zero: 0.5 becomes 1 and −0.5 becomes −1.
- The engine supports 0 to 200 decimal places.
A rounded decimal is not a substitute for the fraction if you are going to keep calculating with the result.
Order of operations
Expressions are evaluated in this order:
- Parentheses and brackets.
- Powers with an integer exponent. They group from right to left, and −2^2 equals −4 because the power is computed before the sign.
- Multiplication and division, left to right. A number next to a parenthesis, as in 2(3 + 4), is multiplied.
- Addition and subtraction, left to right.
If the expression contains the ÷ sign, the fraction bar / groups before × and ÷, so 1/2 ÷ 3/4 reads as (1/2) ÷ (3/4). For examples with parentheses, see expressions with fractions.
Negative mixed numbers
The sign of a mixed number applies to the whole quantity: −2 1/3 equals −7/3, not −2 + 1/3. The fractional part of a mixed number must be proper: “2 4/3” is rejected.
How the engine is tested
Automated tests compare every operation with a separate cross-multiplication calculation, using integers of up to twelve digits. They also check that the reduced form is unique, that addition is commutative and associative, that subtracting and adding back returns the starting value, and that the sign of a mixed number applies to the whole-number part. Each property runs with a fixed seed and, by default, 1,000 cases. The 100-digit limit is tested too.
The numeric examples on the pages can be repeated in the calculator. If a result does not match, tell us on the corrections page.