跳转到正文
∨∧

GCD / LCM Calculator

GCD and LCM for two or more integers.

Separate with commas, spaces, or newlines. Negatives use absolute value. Full-width digits OK.

GCD
6
LCM
180
Count
3
Inputs
12, 18, 30
Reduced (|n|/GCD)
2 : 3 : 5

GCD via Euclidean algorithm; LCM = |a·b|/gcd(a,b) extended to many args. Up to 36 digits per input, 72 for LCM, 100 values max.

关于GCD / LCM Calculator

GCD and LCM show up whenever you simplify fractions, reduce ratios, or align cycles. Two small numbers are fine by hand; three or more — or large digits — mean repeated Euclidean steps or factorizations and easy mistakes. Paste two or more integers separated by commas, spaces, or newlines and get the overall GCD and LCM together. Negatives are taken by absolute value; results are non-negative. You also see each |n| divided by the GCD (e.g. 12, 18, 30 → 2 : 3 : 5). If a zero is present, we follow the usual convention lcm(0, n) = 0 and show a note. Everything uses BigInt in your browser; nothing is sent to toco.tools servers.

使用方法

  1. Enter two or more integers separated by commas, spaces, or newlines
  2. Read GCD, LCM, and the reduced ratio
  3. Copy the summary if needed

常见问题

Does it work for more than two numbers?

Yes. It computes GCD and LCM of the whole list (up to 100 integers).

How are negatives and zero handled?

Negatives use absolute value; results are non-negative. With a zero, LCM is 0 (lcm(0,n)=0); if all are zero, GCD is 0 as well.

Is my input sent anywhere?

No. All calculation runs in your browser; nothing is sent to toco.tools servers.