Zum Hauptinhalt springen
EverydayToolsEINFACH • KOSTENLOS • SCHNELL
ZuhauseKategorien
Suchwerkzeuge...
  1. Home
  2. Mathematik & Statistik
  3. GCF Calculator
Advertisement
Loading...
Advertisement
Loading...

Find the Greatest Common Factor with step-by-step solutions

The Greatest Common Factor (GCF) — also called the Greatest Common Divisor (GCD) or Highest Common Factor (HCF) — is the largest positive integer that divides two or more integers without leaving a remainder. It is one of the most fundamental concepts in mathematics, forming the backbone of fraction simplification, algebraic manipulation, and number theory. Whether you are a student simplifying fractions, a teacher preparing lesson materials, or a programmer working on algorithms, understanding and computing the GCF is an essential skill. Our GCF Calculator gives you instant results along with detailed step-by-step solutions, so you not only get the answer but also understand how it was found. The GCF has countless practical applications. When you reduce a fraction like 18/24 to its simplest form (3/4), you are dividing both numerator and denominator by their GCF, which is 6. In algebra, factoring expressions such as 12x + 8 requires recognizing the GCF of the coefficients (4) to write it as 4(3x + 2). In everyday life, the GCF helps solve problems like dividing items into equal groups, tiling floors with the largest possible square tiles, or distributing resources evenly without leftovers. Our calculator supports three proven methods. The Euclidean Algorithm is the fastest approach — it repeatedly divides the larger number by the smaller and takes the remainder until it reaches zero, revealing the GCF at the final non-zero step. This method is ideal for large numbers and is what most calculators use internally. The Prime Factorization method breaks each number down into its prime factors (e.g., 48 = 2⁴ × 3) and identifies the common factors at their lowest exponents — an excellent teaching tool that builds deep number intuition. The Listing Factors method enumerates all divisors of each number and picks the largest one they share, making it highly transparent for small numbers. Beyond the GCF, this calculator also computes the Least Common Multiple (LCM) — the smallest number that all inputs divide into evenly. The GCF and LCM are deeply connected: for any two integers a and b, GCF(a, b) × LCM(a, b) = a × b. This relationship makes it easy to find one if you know the other. The visual prime factor chart shown in results helps you see at a glance which prime factors are shared (highlighted) versus unique to each number. This is especially useful when working with multiple numbers simultaneously. The tool also displays all factors of each number, with the GCF highlighted, providing complete transparency into the calculation. With support for 2 to 10 numbers and full step-by-step working for each method, this calculator is suitable for homework help, exam preparation, teaching demonstrations, and professional use alike.

Understanding Greatest Common Factor

What Is the Greatest Common Factor?

The Greatest Common Factor (GCF) of a set of integers is the largest positive integer that divides all the numbers in the set evenly — meaning with no remainder. For example, the GCF of 12 and 18 is 6, because 6 is the largest number that divides both 12 (giving 2) and 18 (giving 3) without any remainder. The GCF is also called the Greatest Common Divisor (GCD), a term more common in higher mathematics, and the Highest Common Factor (HCF), which is the preferred term in British and Australian mathematics curricula. All three terms refer to identical concept. For any integer n, GCF(n, 0) = n by convention, and GCF of any number with 1 is always 1 since 1 divides every integer.

How Is the GCF Calculated?

Three standard methods exist for calculating the GCF. The Euclidean Algorithm is the most efficient: given two numbers a and b (where a > b), compute a mod b to get remainder r. Then GCF(a, b) = GCF(b, r). Repeat until the remainder is 0 — the last non-zero value is the GCF. For example, GCF(48, 36): 48 = 1×36 + 12, then 36 = 3×12 + 0, so GCF = 12. For more than two numbers, apply GCF pairwise: GCF(a, b, c) = GCF(GCF(a, b), c). The Prime Factorization method factors each number into primes (e.g., 48 = 2⁴×3, 36 = 2²×3²), then GCF = product of shared primes at minimum exponents = 2²×3¹ = 12. The Listing Factors method enumerates all divisors of each number and returns the largest common entry.

Why Does the GCF Matter?

The GCF is fundamental in mathematics and has immediate practical uses. Fraction simplification relies entirely on GCF: to reduce p/q to lowest terms, divide both by GCF(p, q). For example, 36/48 simplifies to 3/4 by dividing by 12. In algebra, factoring polynomials begins with extracting the GCF from all terms. The GCF also appears in solving linear Diophantine equations (ax + by = c has integer solutions if and only if GCF(a, b) divides c), in cryptography (RSA key generation), and in computer science algorithms. Practically, the GCF helps with problems like: how many equal groups can 24 apples and 36 oranges be split into? The answer is GCF(24, 36) = 12 groups of 2 apples and 3 oranges each.

Einschränkungen und Sonderfälle

While the GCF is straightforward for positive integers, some edge cases deserve attention. Negative integers: the GCF is defined as positive, so this calculator takes absolute values automatically. Zero: GCF(a, 0) = a for any positive a. Very large numbers: while the Euclidean algorithm remains efficient for arbitrarily large integers (logarithmic time complexity), displaying prime factorizations becomes cumbersome for large primes. This calculator handles numbers up to JavaScript's safe integer range (~9 quadrillion), though very large prime-factorization steps may be omitted for display purposes. Co-prime numbers: if GCF = 1, the numbers share no common factors other than 1 — they are said to be co-prime or relatively prime, and their LCM equals their product.

GCF Formulas

Euclidean Algorithm

GCF(a, b) = GCF(b, a mod b), until remainder = 0

Repeatedly divide the larger number by the smaller and take the remainder. When the remainder reaches zero, the last non-zero remainder is the GCF. Runs in O(log min(a,b)) time.

Prime Factorization Method

GCF = product of shared primes at minimum exponents

Factor each number into primes, identify the primes common to all numbers, and multiply them together using the smallest exponent found for each.

GCF-LCM Relationship

LCM(a, b) × GCF(a, b) = a × b

For any two positive integers, the product of their LCM and GCF equals the product of the numbers themselves. Useful for finding LCM when GCF is known.

GCF Reference Tables

GCF of Common Number Pairs

Quick reference showing the GCF for frequently encountered number combinations.

NumbersGCFCo-prime?
12, 186Nein
15, 255Nein
24, 3612Nein
8, 91Ja
14, 217Nein
16, 4816Nein
7, 111Ja
30, 4515Nein
20, 284Nein
9, 123Nein

Prime Factorizations of Numbers 2–50

Reference table of prime factorizations for small integers, useful for the prime factorization method of finding GCF.

NumberPrime FactorizationNumberPrime Factorization
22273³
42²282² × 7
62 × 3302 × 3 × 5
82³322⁵
93²333 × 11
102 × 5355 × 7
122² × 3362² × 3²
142 × 7382 × 19
153 × 5393 × 13
162⁴402³ × 5
182 × 3²422 × 3 × 7
202² × 5442² × 11
213 × 7453² × 5
242³ × 3482⁴ × 3
255²502 × 5²

Worked Examples

Find GCF of 48 and 36 Using the Euclidean Algorithm

Use the Euclidean algorithm to find GCF(48, 36).

1

48 ÷ 36 = 1 remainder 12 → GCF(48, 36) = GCF(36, 12)

2

36 ÷ 12 = 3 remainder 0 → GCF(36, 12) = 12

3

The remainder is 0, so the last non-zero remainder (12) is the GCF.

GCF(48, 36) = 12. Verification: 48/12 = 4 and 36/12 = 3, both whole numbers.

Find GCF of Three Numbers: 24, 36, and 60

Find the GCF of 24, 36, and 60 using the iterative pairwise approach.

1

First, find GCF(24, 36): 36 = 1×24 + 12, then 24 = 2×12 + 0 → GCF(24, 36) = 12

2

Next, find GCF(12, 60): 60 = 5×12 + 0 → GCF(12, 60) = 12

3

Final result: GCF(24, 36, 60) = 12

GCF(24, 36, 60) = 12. This means 24, 36, and 60 can all be divided evenly by 12.

GCF via Prime Factorization: 72 and 90

Find GCF(72, 90) using the prime factorization method.

1

Factor 72: 72 = 2³ × 3²

2

Factor 90: 90 = 2 × 3² × 5

3

Identify shared primes at minimum exponents: 2¹ (min of 2³ and 2¹) and 3² (min of 3² and 3²)

4

Multiply: 2¹ × 3² = 2 × 9 = 18

GCF(72, 90) = 18. The fraction 72/90 simplifies to 4/5 by dividing both by 18.

How to Use the GCF Calculator

1

Gib deine Zahlen ein

Type the integers you want to find the GCF for into the number fields. You can start with 2 numbers and click 'Add Number' to include up to 10. Negative numbers are automatically converted to their absolute values.

2

Wählen Sie eine Berechnungsmethode

Select Euclidean (fastest, recommended for large numbers), Prime Factorization (best for understanding and teaching), or Listing Factors (most transparent, best for small numbers). All methods return the same GCF — the choice affects how the working steps are displayed.

3

Click Calculate GCF

Hit the 'Calculate GCF' button or simply fill in the numbers — the calculator auto-updates as you type. The main result shows the GCF prominently, with the companion LCM and the GCF × LCM verification (for 2 numbers).

4

Review Steps and Charts

Scroll through the step-by-step solution to follow the working, inspect the prime factor composition chart to see which factors are shared, and review all factor lists with the GCF highlighted. Use 'Export CSV' to save results for homework or reports.

Häufig gestellte Fragen

What is the difference between GCF, GCD, and HCF?

All three terms — Greatest Common Factor (GCF), Greatest Common Divisor (GCD), and Highest Common Factor (HCF) — refer to exactly the same mathematical concept: the largest positive integer that divides a set of integers without leaving a remainder. GCF is the most common term in US middle-school mathematics. GCD is preferred in higher mathematics, number theory, and computer science. HCF is the standard term in British, Australian, and Indian curricula. This calculator uses GCF throughout, but the results apply equally regardless of which name you know the concept by.

How does the Euclidean algorithm work?

The Euclidean algorithm is one of the oldest known algorithms, described by Euclid around 300 BCE. It is based on the principle that GCF(a, b) = GCF(b, a mod b). Starting with two numbers, you divide the larger by the smaller and take the remainder. Then you apply the same operation to the smaller number and the remainder. You continue until the remainder reaches zero — the last non-zero value is the GCF. For example, GCF(48, 36): 48 ÷ 36 = 1 remainder 12; 36 ÷ 12 = 3 remainder 0; so GCF = 12. This method runs in O(log min(a,b)) time, making it extremely efficient even for very large numbers.

What is the GCF used for in real life?

The GCF has many practical uses beyond the classroom. In cooking and baking, it helps scale recipes: if a recipe serves 12 but you need it for 8, find GCF(12, 8) = 4 to reduce to the simplest ratio 3:2. In construction, the GCF determines the largest square tile that can cover a floor of given dimensions without cutting (e.g., a 360cm × 240cm floor uses GCF(360, 240) = 120cm tiles). In sharing and distribution problems, the GCF tells you the maximum equal groups: 24 pens and 36 notebooks can be bundled into GCF(24, 36) = 12 identical packs. In fractions, simplifying 24/36 to 2/3 requires finding GCF(24, 36) = 12.

Can the GCF ever be larger than one of the input numbers?

No — the GCF can never exceed any of the input numbers. By definition, the GCF must divide each input number, so it cannot be larger than the smallest input. The GCF equals the smallest input only when the smaller number divides all the larger ones evenly (e.g., GCF(4, 8, 12) = 4 because 4 divides 8 and 12). The minimum possible GCF is 1 — this happens when the numbers are co-prime (share no common factors), such as GCF(7, 11) = 1 or GCF(8, 9) = 1. A GCF of 1 means the numbers are already in their simplest relative form.

What is the relationship between GCF and LCM?

For any two positive integers a and b, the relationship GCF(a, b) × LCM(a, b) = a × b always holds. This is an extremely useful identity: if you know the GCF and the product of two numbers, you can find the LCM immediately (LCM = product / GCF), and vice versa. For example, GCF(12, 18) = 6 and 12 × 18 = 216, so LCM = 216 / 6 = 36. Note that this exact relationship does not generalize cleanly to three or more numbers — for multiple numbers, both GCF and LCM must be computed pairwise iteratively, which is what this calculator does.

How do I find the GCF of more than two numbers?

To find the GCF of three or more numbers, apply the GCF operation iteratively. Start with the first two numbers, find their GCF, then find the GCF of that result with the third number, and so on. For example, GCF(12, 18, 30): GCF(12, 18) = 6, then GCF(6, 30) = 6. The final answer is 6. This works because the GCF operation is associative: GCF(a, b, c) = GCF(GCF(a, b), c). This calculator handles 2 to 10 numbers automatically using this iterative approach, and shows the intermediate GCF values when you select the Euclidean method with three or more inputs.

Related Tools

LCM Calculator

Find the Least Common Multiple of 2 to 10 numbers with step-by-step solutions

Prozentsatzrechner

Calculate percentages, percentage change, and reverse percentages

Durchschnittsrechner

Calculate mean, median, mode, and advanced statistics from any dataset

Online Calculator

Free general-purpose calculator for basic and scientific math operations

Algebra Rechner

Solve algebraic equations and simplify expressions step by step

EverydayToolsEINFACH • KOSTENLOS • SCHNELL

Kostenlose Online-Tools für Nicht-IT-Profis. Rechner, Konverter, Generatoren und mehr.

Beliebte Kategorien

  • Gesundheitsrechner
  • Finanzrechner
  • Umrechnungswerkzeuge
  • Mathe-Rechner

Unternehmen

  • Über uns
  • Kontakt
  • Datenschutzrichtlinie
  • Nutzungsbedingungen

© 2026 EverydayTools.io. Alle Rechte vorbehalten.