最大公約数計算機

Illustration of using the GCF calculator to find the greatest common factor

素因数分解法とユークリッドの互除法を用いて、2つ以上の数の最大公約数を計算します。ステップバイステップの説明で即時結果を取得。

If you need to calculate GCF for homework, simplify a fraction, compare GCF and LCM, or check the GCF of 3 numbers, this page gives you both the answer and the method behind it.

🧮 最大公約数計算機

2つ以上の正の整数をカンマで区切って入力してください

最大公約数 (GCF) とは?

最大公約数 (GCF) は、最大公約因数 (GCD) または最高公約数 (HCF) とも呼ばれ、2つ以上の数を余りなく割ることができる最大の正の整数です。これは数論における基本概念であり、数学や代数、コンピュータサイエンスに広く応用されています。

Diagram showing common factors shared by two numbers

例えば、12 と 18 の GCF は 6 です。なぜなら、6 は 12 と 18 の両方を等しく割ることができる最大の数だからです。GCF は、特に分数の簡約、共通分母の発見、比率や可除性に関する問題を解決する際に役立ちます。

GCF vs GCD vs HCF — are they the same?

Yes. GCF, GCD, and HCF usually mean the same thing. GCF means greatest common factor. GCD means greatest common divisor. HCF means highest common factor. Different textbooks and regions may use different names, but all three refer to the largest number that divides the given numbers evenly.

GCF 計算機の使い方

Use this section if you are wondering how to find GCF on calculator tools without doing every step by hand.

  1. 数を入力: 入力フィールドにカンマで区切って2つ以上の正の整数を入力します(例: 330, 75, 450, 225)。
  2. 計算をクリック: 「GCF を計算」ボタンを押して最大公約数を計算します。Screenshot of GCF calculator results with step-by-step work
  3. 結果を見る: 計算機は GCF 値、各数の素因数分解、共通因数のハイライト、およびユークリッドの互除法(2つの数の場合)を用いたステップバイステップの計算を表示します。

GCF に関する重要なインサイト

  • 複数の計算方法: GCF は、すべての因数をリストする方法、素因数分解、またはユークリッドの互除法を含むさまざまな方法で計算できます。各方法には、関与する整数のサイズや数に応じた利点があります。
  • 分数の簡約に必須: GCF は、分数をその最も簡単な形に減らすのに重要です。分子と分母の両方を GCF で割ることで、簡約された分数が得られます。
  • 暗号学における応用: GCF と関連するアルゴリズムは、特に RSA 暗号化やその他の数論に基づくセキュリティシステムにおいて、現代の暗号学で重要な役割を果たします。
  • 常に正の整数: GCF は常に正の整数であり、任意の数のセットに対して GCF は少なくとも 1 になります(1 はすべての整数を割り切るので)。
  • 効率が重要: 小さな数では、素因数分解は直感的で理解しやすいです。大きな数では、ユークリッドの互除法がより効率的で計算速度が速いです。

GCF を計算する方法

There are three common ways to calculate the GCF: listing the factors, using prime factorization, and using the Euclidean algorithm. Each one gives the same answer, so how to calculate the GCF really comes down to which method fits your numbers.

1. すべての因数をリストする

この方法は、各数のすべての因数をリストし、最大の共通因数を特定します。小さな数に対しては簡単ですが、大きな整数には実用的ではありません。

tools.gcfCalculator.method1Example

This method is simple for small numbers and is a good way to learn what "common factor" means.

2. 素因数分解

各数をその素因数に分解し、共通の素因数(最小の指数を持つもの)を掛け合わせて GCF を見つけます。この方法は視覚的で、数の構造を理解するのに役立ちます。

例: 12 = 2² × 3 および 18 = 2 × 3²。共通因数: 2¹ × 3¹ = 6、したがって GCF = 6。

Prime factorization is useful when you want to see the structure of each number and understand why the answer works.

3. ユークリッドの互除法

この古代の効率的なアルゴリズムは、除算のプロセスを繰り返し適用します: 大きな数を小さな数で割り、大きな数を小さな数に置き換え、小さな数を余りに置き換えます。余りが 0 になるまで続けます。最後の非ゼロの余りが GCF です。

例: GCF(48, 18): 48 = 18 × 2 + 12, 次に 18 = 12 × 1 + 6, 次に 12 = 6 × 2 + 0。GCF = 6。

Factor Out the GCF of Variables, Monomials & Polynomials

A factoring GCF calculator helps with the same core idea: find the largest factor shared by every term, then factor it out. For a numeric expression: 6 + 12 = 6(1 + 2). For an algebraic expression: 6x + 12 = 6(x + 2).

For monomials and polynomials, the GCF may include numbers, variables, or both. Example: 8x² + 12x = 4x(2x + 3). This page's calculator focuses on numeric GCF for positive integers. If you are looking for a factor out GCF calculator for variables, monomials, or polynomials, use the same rule: find the shared numerical factor and the shared variable part with the lowest exponent.

GCF and LCM Calculator – Find Both Together

A GCF and LCM calculator helps you compare two related ideas. GCF is the greatest number that divides the given numbers evenly. LCM is the smallest number that the given numbers divide into evenly.

For two positive integers:

GCF × LCM = product of the two numbers

Example: for 12 and 18: GCF = 6, LCM = 36, 12 × 18 = 216.

The relationship between GCF and LCM

That formula is more than a trick. Because every prime factor of the two numbers ends up in either the GCF (the shared part) or the LCM (the combined part), multiplying them always rebuilds the original product. So if you already know the GCF, you can find the LCM fast:

LCM = (a × b) ÷ GCF

For 12 and 18: (12 × 18) ÷ 6 = 216 ÷ 6 = 36.

Note that this shortcut works cleanly for two numbers. For three or more, calculate the LCM directly instead of dividing the full product by the GCF.

Simplify Fractions Using the GCF

Simplifying fractions using the GCF is one of the most common reasons people reach for a GCF fraction calculator. The idea is simple: divide the numerator and the denominator by their GCF, and the fraction is reduced to lowest terms in one step.

Example: reduce 24/36. The GCF of 24 and 36 is 12. 24 ÷ 12 = 2, 36 ÷ 12 = 3. So 24/36 simplifies to 2/3.

If you divide by a common factor that is not the greatest one, you will still need to simplify again. Using the GCF gets you to lowest terms immediately, which is why it is the cleanest method for reducing any fraction.

Find the GCF of 3 or More Numbers

A GCF of 3 numbers calculator works the same way as it does for two numbers. The GCF of a longer set is the largest integer that divides every number in the set. By hand, the easiest approach is to take the GCF two numbers at a time: find GCF(a, b), then find GCF of that result and c.

Find GCF(a, b), then find GCF of that result and c.

Example: find the GCF of 24, 36, and 60. GCF(24, 36) = 12, then GCF(12, 60) = 12. So the GCF of 24, 36, and 60 is 12.

This pairwise method scales to any number of values, and it is exactly what the calculator does internally when you enter a longer set.

Worked Examples – Common GCF Calculations

These are some of the GCF pairs people look up most often. Each one is worked the short way so you can check your own answer quickly.

NumbersShared factorsGCF
12 and 181, 2, 3, 66
8 and 121, 2, 44
16 and 241, 2, 4, 88
18 and 241, 2, 3, 66
15 and 251, 55
24 and 361, 2, 3, 4, 6, 1212

For the most common classroom example, the GCF of 12 and 18 is 6, because 6 is the largest number that divides both 12 and 18 without leaving a remainder.

Coprime numbers — when the GCF is 1

Sometimes two numbers share no common factor other than 1. When that happens, the GCF is 1, and the numbers are called coprime (or relatively prime).

Example: 8 and 15. Factors of 8: 1, 2, 4, 8. Factors of 15: 1, 3, 5, 15. The only shared factor is 1, so the GCF of 8 and 15 is 1. A fraction like 8/15 is already in lowest terms, because there is nothing left to divide out.

GCF の現実世界での応用

  • 分数の簡約: 分子と分母の両方を GCF で割ることで、分数を最も低い項に簡約します。
  • 共通分母の発見: 分数の加算または減算を行うとき、GCF は共通分母の最小公倍数 (LCM) を見つけるのに役立ちます。
  • 代数方程式の解法: 多項式式から GCF を因数分解することで、方程式をより簡単に解くことができます。
  • 数論と暗号学: GCF は、暗号化、デジタル署名、セキュアな通信に使用されるアルゴリズムにおいて基本的です。
  • 最適化問題: コンピュータサイエンスでは、GCF はアルゴリズムの最適化、計算の複雑さの削減、および可除性やモジュラー演算を含む問題の解決に使用されます。

よくある質問 (FAQ)

GCF と LCM の違いは何ですか?

GCF (最大公約数) は、与えられたすべての数を等しく割る最大の数であり、LCM (最小公倍数) は、与えられたすべての数の倍数の中で最小の数です。これらは関連しています: GCF × LCM = 2つの数の積(2つの数の場合)。

GCF は最小の数より大きくなることがありますか?

いいえ、GCF はセット内の最小の数より大きくなることはありません。GCF は常に最小の数以下です。

2つの素数の GCF は何ですか?

2つの異なる素数の GCF は常に 1 です。なぜなら、素数には 1 以外の共通因数がないからです。

2つ以上の数の GCF をどのように見つけますか?

複数の数の GCF を見つけるには、まず 2つの数の GCF を見つけ、その結果と次の数の GCF を見つけるというプロセスを繰り返します。あるいは、素因数分解を使用してすべての共通素因数を特定します。

ユークリッドの互除法はなぜ効率的なのですか?

ユークリッドの互除法は、各ステップで問題のサイズを急速に縮小するため、すべての因数を列挙するよりもはるかに高速です。特に大きな数に対して。その時間計算量は対数的です。

0 と任意の数の GCF は何ですか?

0 と任意の非ゼロの数 n の GCF は n 自体です。なぜなら、すべての整数は 0 を割り切るからです。しかし、実際のアプリケーションでは通常、正の整数のみを扱います。

Need More Than a Calculator? Meet Macaron

A GCF calculator solves one problem well. But homework, study sessions, and everyday questions rarely stop at a single calculation.

Macaron is a personal AI that remembers what you are working on and can build small tools, walkthroughs, and study help around the way you actually learn. If you find yourself reaching for one calculator after another, it is a way to keep all of that in one place that adapts to you.

Create your own tools with Macaron

Related tools and reading

参考文献とさらなる読み物

  1. 最大公約数 (GCF) - BYJU'S
  2. 最大公約数 - GeeksforGeeks
  3. 最大公約数計算機 - Calculator.net
  4. 最大公約数 - Math is Fun
  5. 最大公約数 - Wikipedia
  6. 最大公約数 (GCF) の解説 - Khan Academy