Fraction Calculator
Add, subtract, multiply or divide two fractions. Get an exact simplified fraction and mixed number, with the calculation and common divisor shown.
What is a fraction calculator?
A fraction represents a numerator divided by a nonzero denominator. This calculator adds, subtracts, multiplies or divides two fractions and reduces the result to lowest terms. Calculations use exact integer arithmetic, so large intermediate products do not lose digits through decimal rounding.
How to use this calculator
- Enter the numerator (top number) and denominator (bottom number) of the first fraction.
- Select an operation and enter the second fraction. Results update as the inputs change.
- Read the simplified fraction, its mixed-number equivalent, and the calculation underneath.
Whole numbers can be entered with a denominator of 1. For a mixed input such as 2 1/3, enter 7 as the numerator and 3 as the denominator. A negative mixed result such as −2 1/3 means −(2 + 1/3), or −7/3. Proper fractions stay as fractions in the mixed-number field, and integer results appear without a denominator.
The formula
For fractions a/b and c/d:
- Add: (a × d + c × b) / (b × d).
- Subtract: (a × d − c × b) / (b × d).
- Multiply: (a × c) / (b × d).
- Divide: (a × d) / (b × c), provided c is nonzero.
A negative denominator is moved to the numerator by reversing both signs. Dividing numerator and denominator by their greatest common divisor gives lowest terms. The integer quotient and remainder of the absolute numerator divided by the positive denominator give the mixed number; the sign applies to the whole result.
Worked example
For 3/4 + 5/6, the numerator is 3 × 6 + 5 × 4 = 38 and the denominator is 4 × 6 = 24. Their greatest common divisor is 2, so 38/24 reduces to 19/12. Since 19 = 1 × 12 + 7, the mixed number is 1 7/12.
Zero, signs and input limits
Zero is a valid numerator, and a zero result is displayed as 0. A zero denominator is undefined and is rejected. Division by any fraction with a zero numerator is also rejected. Negative numerators and denominators are accepted, including two negative signs in one fraction, which cancel.
Each field accepts up to 15 digits plus an optional leading sign. Empty fields, decimals, exponent notation, commas and other text produce a prompt instead of a result. This limit keeps each calculation small and responsive. Exact results use the browser's built-in BigInt support; no library or remote service is needed.