GCD simplifies a fraction; LCM builds a common denominator
These two integer operations solve different fraction problems. Choosing the right one keeps intermediate numbers small and the reasoning clear.
GCD and LCM calculator →Use GCD to reduce
For 18/24, gcd(18,24)=6. Divide both numerator and denominator by 6 to get 3/4. Dividing only one changes the value. The GCD is the largest positive factor shared by the two magnitudes; using it reduces the fraction in one step. Smaller shared factors can also work, but may require repeated simplification.
Use LCM to add unlike denominators
For 5/12 + 7/18, lcm(12,18)=36. Convert the fractions to 15/36 and 14/36, giving 29/36. Multiplying the denominators would give 216, which is valid but unnecessarily large here. The fraction calculator can perform the full operation, while the GCD/LCM tool helps explain why 36 is the smallest positive denominator shared by both.
Understand zero and signs
For positive integers a and b, gcd(a,b)×lcm(a,b)=a×b. The tool uses nonnegative results for negative inputs and returns LCM zero when exactly one input is zero. That arithmetic convention does not make zero a valid fraction denominator. Fractions always require nonzero denominators, and both-zero GCD inputs are rejected here. Check the domain of the problem even when a related integer operation is accepted. For the addition example, multiplying the final result 29/36 by 36 should recover the combined numerator 29, providing a straightforward arithmetic check.
Try the calculators
- GCD and LCM calculator
Find the greatest common divisor and least common multiple of two integers.
- Fraction calculator
Add, subtract, multiply and divide fractions.
- Ratio calculator
Find d in a:b = c:d from a, b and c.