全球免费使用

最大公约数和最小公倍数计算器

求两个或多个任意大小整数的最大公约数和最小公倍数。

你的数据只保留在此标签页中。我们不会收到你的文件、粘贴的文本或计算数值。

输入

提示:按 Ctrl + Enter 运行

你的结果

结果将显示在这里。

下方的详细帮助目前仅提供英文版。

关于此工具

The greatest common divisor (GCD) is the largest number that divides all your numbers; the least common multiple (LCM) is the smallest number they all divide. You need the GCD to simplify fractions and ratios, and the LCM to add fractions with different denominators or to find when repeating schedules line up. This calculator handles any count of whole numbers of any size.

使用方法

  1. Enter two or more whole numbers separated by commas or spaces.
  2. Run the calculation.
  3. Read the GCD, the LCM and whether the numbers are coprime (GCD of 1).
  4. Use the listed breakdown to see how each number relates to the GCD.

计算原理

GCD by Euclid’s algorithm, gcd(a, b) = gcd(b, a mod b), applied across the list. LCM by lcm(a, b) = |a × b| ÷ gcd(a, b), applied pairwise. Big integers keep results exact.

Euclid: gcd(a, b) = gcd(b, a mod b); lcm(a, b) = |a × b| ÷ gcd(a, b)

计算示例

Three bus routes leave a station every 12, 18 and 30 minutes. Their LCM is 180, so all three leave together every 180 minutes (3 hours). Their GCD is 6, and the breakdown shows 12 = 6 × 2, 18 = 6 × 3 and 30 = 6 × 5.

示例输入和结果

用逗号或空格分隔的整数: 84, 126, 210

→ 最大公约数(GCD): 42
→ 最小公倍数(LCM): 1,260
→ 互质: 否

局限性

  • Whole numbers only.
  • At least two numbers.
  • Very long lists may be slower.

最后更新:

常见问题

What does coprime mean?

Numbers whose GCD is 1 share no factor other than 1, such as 8 and 15.

How do I use the LCM to add fractions?

Use it as the common denominator: for 1/12 + 1/18, the LCM 36 gives 3/36 + 2/36.

Can I enter negative numbers?

Use positive whole numbers; signs do not change the GCD.

故障排除

It reports invalid input.

Remove decimals and thousands separators.

The LCM is enormous.

With many unrelated large numbers, the LCM grows quickly; this is expected.

I need prime factors.

Use the prime factorization calculator.

隐私 & 免费使用

我的输入会被保存吗?

你的数据只保留在此标签页中。我们不会收到你的文件、粘贴的文本或计算数值。

这个工具免费吗?

是的。无需注册或付费。

在浏览器中处理

推荐下一步