AnsRioSmart tools. Clear answers.
Home / Math & statistics / GCD and LCM of integers
Math & statistics

GCD and LCM of integers

Find the greatest common divisor and least common multiple of two or more integers, including exact large integers.

Enter your values ⌁ Runs on your device

Your inputs stay in this browser and are not saved to an account.

YOUR RESULT
Ready when you are.

Enter your values, then select Calculate.

QUICK ANSWER

6

Use the inputs above for your own values. The result follows the method and assumptions shown below.

How it works

Use Euclid’s algorithm for GCD and LCM(a,b)=abs(a×b)/GCD(a,b); fold across all inputs.

Input definitions

Whole integers separated by commas or spaces
Plain text; maximum 200,000 characters.

A worked example

Whole integers separated by commas or spaces
12,18,30
6

Assumptions & limits

Mathematical calculation using the stated inputs; not a measurement guarantee.

Sources & review

Maintained by AnsRio. Methods and examples are reviewed against the stated formula; this is not professional certification.

Method updated 2026-10-17. Reviewed against the stated method and example. Our verification approach.

Report an issue with this tool or suggest an improvement ↗

Common questions

Why can statistical results differ between tools?

Denominator, interpolation and boundary conventions can differ. Use the method and assumptions on this page to compare the same definition; displayed decimals may also be rounded.

How does the GCD and LCM of integers tool work?

Use Euclid’s algorithm for GCD and LCM(a,b)=abs(a×b)/GCD(a,b); fold across all inputs.

What are the assumptions and limits of GCD and LCM of integers?

Mathematical calculation using the stated inputs; not a measurement guarantee.

↗
Private tools for everyday decisions.

No sign-up. Tool inputs stay on your device.

How we work