GCF Calculator
Find the greatest common factor (GCF) and least common multiple (LCM) for any set of numbers. Includes prime factorization method.
6 values
Mean (Average)
24
Median
18.5
Sum
144
Count
6
Min
8
Max
47
About the GCF Calculator
A GCF calculator (Greatest Common Factor calculator) — also called a GCD calculator (Greatest Common Divisor) or HCF calculator (Highest Common Factor) — finds the largest positive integer that divides two or more numbers exactly without a remainder. The GCF is fundamental to simplifying fractions to their lowest terms, factoring algebraic expressions, and solving numerous number theory problems. Our calculator uses the highly efficient Euclidean algorithm to find the GCF instantly for any combination of numbers, and also shows the prime factorisation method as a learning tool so you can understand why the result is correct. It handles two, three, or more numbers simultaneously, accepts very large numbers, and displays the complete step-by-step Euclidean algorithm or prime factorisation working depending on your preference. The relationship GCF(a,b) x LCM(a,b) = a x b connects the GCF directly to the LCM (Least Common Multiple), making these two calculators natural complements.
Formula
Euclidean: GCF(a,b) = GCF(b, a mod b) until remainder = 0 | GCF x LCM = a x b
How It Works
Euclidean algorithm (most efficient method): GCF(a,b) = GCF(b, a mod b), repeating until the remainder is 0. The last non-zero remainder is the GCF. Example: GCF(48, 36). Step 1: 48 = 1 x 36 + 12. GCF(48,36) = GCF(36,12). Step 2: 36 = 3 x 12 + 0. Remainder is 0, so GCF = 12. Prime factorisation method: factor each number completely, then multiply the shared prime factors at their lowest powers. 48 = 2^4 x 3. 36 = 2^2 x 3^2. Shared primes: 2 (lowest power: 2^2 = 4) and 3 (lowest power: 3^1 = 3). GCF = 4 x 3 = 12. Verification: 48/12 = 4, 36/12 = 3. Both are integers, confirming GCF = 12.
Tips & Best Practices
- ✓Fraction simplification: divide both numerator and denominator by their GCF to get the simplest form. 24/36: GCF(24,36) = 12. 24/12 = 2, 36/12 = 3. Simplified fraction: 2/3.
- ✓Coprime numbers: if GCF(a,b) = 1, the numbers share no common factors and are called coprime or relatively prime. Consecutive integers (7 and 8, 15 and 16) are always coprime.
- ✓Algebraic factoring: GCF applies to algebraic expressions too. GCF of 12x^2 and 8x = 4x. Factor: 12x^2 + 8x = 4x(3x + 2). Finding the GCF of coefficients is the first step in polynomial factoring.
- ✓Three or more numbers: GCF(a,b,c) = GCF(GCF(a,b), c). Find the GCF of the first two, then find the GCF of that result with the third number.
- ✓GCF and LCM relationship: GCF(12,18) x LCM(12,18) = 12 x 18 = 216. GCF = 6. LCM = 216/6 = 36. This relationship allows calculating LCM without finding prime factorisations separately.
- ✓RSA cryptography: the security of RSA encryption relies on the computational difficulty of finding the GCF of very large numbers when using Euler's totient function — the Euclidean algorithm is the key computational tool.
- ✓Tile and grid problems: the GCF determines the largest square tile that can cover a rectangular floor without cutting. A 12ft x 18ft floor: GCF(12,18) = 6. The largest whole-number tile is 6ft x 6ft.
- ✓Music theory: the GCF relates to rhythm. A rhythm pattern repeating every 12 beats combined with one every 8 beats will align every GCF(12,8) = 4 beats.
Who Uses This Calculator
Students simplifying fractions in arithmetic and pre-algebra. Algebra students factoring polynomial expressions by extracting the GCF. Number theory students exploring divisibility, coprimeness, and the Euclidean algorithm. Computer science students implementing the Euclidean algorithm as a programming exercise. Engineers finding common measurement denominators for mixed-unit systems. Music composers working with rhythmic patterns of different lengths. Cryptography students understanding RSA key generation.
Optimised for: USA · Canada · UK · Australia · Calculations run in your browser · No data stored
Frequently Asked Questions
How do you find the GCF?
List all factors of each number and find the largest shared factor. GCF(12,18) = 6 since 1,2,3,6 are common factors of both.