Use the gcd and lcm calculator
Use 1–100 integers of up to 50 digits each. Results use BigInt and remain exact.
Result
Enter values, then select the action button.
Find the greatest common divisor and least common multiple of whole numbers using exact integer arithmetic.
Use 1–100 integers of up to 50 digits each. Results use BigInt and remain exact.
Enter values, then select the action button.
The greatest common divisor divides every input exactly. The least common multiple is the smallest nonnegative common multiple. Euclid’s algorithm finds the GCD; LCM(a,b) = |a × b| / GCD(a,b). Signs are ignored. GCD(0,0) and any LCM containing zero are defined as zero here.
Enter your values in the labeled fields, choose the units or mode where shown, and select the action button. Review the method and limits above. Reset restores the example inputs.
Calculations run locally in your browser. This tool does not upload your entries, fetch external data, or store input in your URL. See our privacy policy for website-wide details.
Found an issue or need another feature? Suggest an improvement.