GCF Calculator
Find the Greatest Common Factor of two numbers using the Euclidean algorithm. Visualizes shared prime factors with a dynamic Venn diagram.
Greatest Common Factor
Results update instantly as you type
Enter Values
Embed Code
Copy and paste this HTML snippet into any web page to embed this calculator directly.
<iframe src="http://127.0.0.1:54963/embed/math/gcf-calculator?ref=embed" title="GCF Calculator" width="100%" style="max-width:600px; border:none; height:500px;" loading="lazy"></iframe>
Direct Link
Share this link to let others open the calculator in their browser.
The Formula
The Greatest Common Factor (GCF), also called the Greatest Common Divisor (GCD), is the largest positive integer that divides both numbers without a remainder. This calculator demonstrates two methods: the Euclidean algorithm (by repeated division) and prime factorization (by comparing shared prime factors with a visual Venn diagram).
Variable Definitions
Input Numbers
The positive integers to find the GCF of. Both must be whole numbers greater than 0.
Greatest Common Factor
The largest positive integer that divides both a and b without a remainder.
Algorithm Steps
A step-by-step division process that efficiently finds the GCF without factoring.
How to Use This Calculator
- 1
Enter two positive integers to find their Greatest Common Factor.
- 2
View the GCF result along with the step-by-step Euclidean algorithm showing each division.
- 3
The Venn diagram visualizes the prime factors of each number, with shared factors in the overlapping region.
- 4
The shared prime factors section lists the primes common to both numbers, which multiply to form the GCF.
The GCF is the product of shared prime factors raised to the lowest exponent in either factorization.
Understanding the Concept
The Greatest Common Factor (GCF) is the largest number that divides into both input numbers evenly. It is also called the Greatest Common Divisor (GCD) or Highest Common Factor (HCF). The Euclidean algorithm is the most efficient method for finding the GCF, especially for large numbers: it works by repeatedly replacing the larger number with the remainder of dividing the larger by the smaller until the remainder reaches zero. The last non-zero remainder is the GCF. This algorithm has been known since ancient Greece (circa 300 BCE) and remains one of the oldest numerical algorithms still in common use. The alternative method, prime factorization, breaks each number into its prime building blocks; the GCF is the product of shared prime factors raised to the lowest exponent appearing in either factorization. For example, 24 = 2 x 2 x 2 x 3 and 36 = 2 x 2 x 3 x 3, so the shared primes are 2 (twice) and 3 (once), giving GCF = 2 x 2 x 3 = 12.
Frequently Asked Questions
Sources & References
Related Calculators
Reviews
No reviews yet. Be the first to share your experience with GCF Calculator.
Write a Review
