Racira Calculator

LCM and GCD Calculator

Prime Factorization View

This LCM and GCD calculator factors each input into primes — 12 = 2²·3, 18 = 2·3², 24 = 2³·3. The GCD collects the minimum exponent of every shared prime (2¹·3¹ = 6); the LCM collects the maximum (2³·3² = 72).

The Euclidean Algorithm

The GCD is also computed by repeated division — the Euclidean algorithm — which works for arbitrarily large integers without factoring. The LCM then follows from the identity a·b = gcd(a,b)·lcm(a,b), applied pairwise.

Where They Matter

LCM and GCD appear everywhere in fractions, ratios, gear ratios, scheduling cycles, and periodic events. Knowing both for a set of numbers also lets you verify your factorization work at a glance.

Frequently Asked Questions

Related Calculators