The Calc Guide › Calculator
GCF Calculator
A GCF calculator finds the greatest common factor of two or more whole numbers with the working shown: the GCF of 24, 36 and 60 is 12, from the shared prime factors 2 x 2 x 3, with the least common multiple, 360, shown as a related result. Checked November 2026.
Last updated: November 24, 2026
Greatest common factor of two or more numbers, with the working shown
Two or more whole numbers, separated with commas, spaces or line breaks. Negative numbers are read by their size, so -12 counts as 12. Decimals and words are not rounded in: the tool says what it set aside. Up to 10 numbers.
How this is worked out
Each number is split into its prime factors; the primes every number shares, at their lowest powers, multiply to the GCF.
The division steps below reach the same answer by the Euclidean algorithm.
Next: put the GCF to work in the Fraction Calculator
Free. No sign-up. Calculated in your browser; nothing is sent to our servers.
What this calculator does
This GCF calculator finds the greatest common factor of two or more whole numbers and shows the working two ways, because schoolwork is marked on the working as much as the answer. Every number is split into its prime factors, with the primes all the numbers share picked out at their lowest powers; alongside it, the division steps of the Euclidean algorithm reach the same answer. The common factors are listed, and the least common multiple is shown as one clearly separated related result, since the two travel together. A center figure for a set of numbers is the average calculator. The concentration of a solution, in moles per liter, is worked by the molarity calculator.
The GCF also travels under two other names, greatest common divisor (GCD) and highest common factor (HCF); all three are the same number.
Worked example: the GCF of 24, 36 and 60
The tool opens on 24, 36 and 60:
Scroll sideways to see all columns →
| Line | Working |
|---|---|
| Prime factorization of 24 | 2 x 2 x 2 x 3, written 2³ x 3 |
| Prime factorization of 36 | 2 x 2 x 3 x 3, written 2² x 3² |
| Prime factorization of 60 | 2 x 2 x 3 x 5, written 2² x 3 x 5 |
| Shared primes at their lowest powers | 2² x 3 |
| Greatest common factor | 12 |
| Division steps | 36 = 1 x 24 + 12; 24 = 2 x 12 + 0, so GCF(24, 36) = 12; then 60 = 5 x 12 + 0, so GCF(12, 60) = 12 |
| Common factors | 1, 2, 3, 4, 6, 12 |
| Least common multiple (related result) | 360 |
Both methods land on 12, and a direct check agrees: 12 divides 24, 36 and 60, and no larger number divides all three, because a common divisor must divide 24, and the only divisor of 24 above 12 is 24 itself, which does not divide 36. The LCM row can be checked in pairs: LCM(24, 36) is 72, and 12 x 72 = 864 = 24 x 36, the pair identity the GCF and LCM section below explains.
Three ways to find a GCF
Scroll sideways to see all columns →
| Method | How it runs | Example |
|---|---|---|
| List the factors | Write every factor of each number; the GCF is the largest entry on every list | 12: 1, 2, 3, 4, 6, 12. 18: 1, 2, 3, 6, 9, 18. Common: 1, 2, 3, 6. GCF = 6 |
| Prime factorization | Split each number into primes; multiply the primes every number shares, each at its lowest power | 48 = 2⁴ x 3 and 60 = 2² x 3 x 5 share 2² x 3, so GCF = 12 |
| Euclidean algorithm | Divide the larger by the smaller, keep the remainder, and repeat with the smaller and the remainder until the remainder is 0; the last non-zero remainder is the GCF | 252 = 2 x 105 + 42; 105 = 2 x 42 + 21; 42 = 2 x 21 + 0, so GCF(252, 105) = 21 |
For more than two numbers, each method folds: find the GCF of the first two, then the GCF of that result and the third number, and so on. Listing is clearest for small numbers, prime factorization is the method textbooks teach first and the one that explains why the answer is what it is, and the Euclidean algorithm is the fastest for large numbers because it never needs the factors at all. The tool prints the factorization and the division steps together so either piece of working can be copied into an exercise book.
GCF and LCM: the distinction, and the link
For two numbers, GCF x LCM = the two numbers multiplied together: 12 x 72 = 864 = 24 x 36
With three or more numbers this identity no longer holds as written, so the tool defines the LCM instead of stating it.
- Opposite directions: the GCF looks down, for the largest number that divides into every input; the LCM looks up, for the smallest number that every input divides into. The GCF of 24 and 36 is 12, a divisor of both; their LCM is 72, a multiple of both.
- Different jobs: the GCF simplifies, splitting a fraction or a ratio down to its smallest terms and dividing quantities into the largest equal groups. The LCM aligns, giving fractions a common denominator or finding when repeating cycles next coincide. Adding fractions needs the LCM of the denominators; reducing the answer needs the GCF.
- Why the LCM rides on this page: the identity above means the two are one fact seen from two sides, and for a pair of numbers each can be computed from the other. The LCM therefore appears here as a separated, labeled result line, while the page, its title and its teaching stay with the GCF.
A GCF of 1 has a name: numbers that share no prime factor, like 8 and 15, are called coprime, or relatively prime. Their GCF is 1, nothing simplifies, and a fraction made from them is already in its lowest terms.
What the tool does with unusual input
- Negative numbers: read by their size, so -12 and 18 give a GCF of 6.
- Decimals and words: set aside and counted, never rounded. Entering 12.5, 10 and 20 returns the GCF of 10 and 20, which is 10, and notes one entry set aside.
- Zero: set aside and counted. Entering 0, 12 and 18 returns 6. Entering only 0 and 12 returns no result.
- Fewer than two usable numbers, or more than ten: no result, and a short instruction.
- The same number twice: the GCF is that number (7 and 7 give 7).
- Very large numbers: browsers store whole numbers exactly only up to 9,007,199,254,740,991. Above that, or when the LCM passes it, results are approximate and should not be relied on.
Sources and method
The greatest common factor is pure arithmetic; there are no statistics to source. The definitions are the standard ones: a factor divides its number with no remainder, a prime factor is a factor that is prime, and the Euclidean algorithm is the division procedure set out in Book VII of Euclid’s Elements.
- Euclid’s Elements, Book VII, Proposition 2, Clark University (D. Joyce’s edition): the procedure for finding the greatest common measure of two numbers.
- OEIS wiki, greatest common divisor: gcd, HCF and GCF as names for the same value; gcd(0, n) = n; the lcm and gcd relation for a pair.
- MDN, Number.MAX_SAFE_INTEGER: the largest whole number a browser stores exactly, 9,007,199,254,740,991.
Every figure on this page was recomputed with code on November 18, 2026, using the same algorithm the tool runs, including GCF(48, 60) = 12 and the Euclidean chain for 252 and 105 ending at 21. Figures checked November 2026.
Change log
November 18, 2026: replaced the claim that “60 divided by anything from 13 to 23 leaves a remainder” (15 and 20 divide 60) with a correct direct check; stated how the tool treats zero and very large numbers; replaced the “American schoolbooks say GCF, British ones HCF” claim, which has no source, with a neutral line; added a gcd(0, n) FAQ and an unusual-input list; replaced the Omni Calculator and Calculator Soup cross-check with linked sources; kept the Fraction Calculator and Proportion Calculator links, both pages confirmed live on November 18, 2026; removed a “not financial advice” line that did not fit a math page; privacy line kept verbatim in full.
November 3, 2026: first full version.
Questions or corrections: contact us.
Related calculators
The Fraction Calculator is where the GCF goes to work: simplifying a fraction divides its top and bottom by exactly this number. The Proportion Calculator solves ratios, whose terms reduce by the GCF the same way. More number work sits on the School and Study calculators hub.
Frequently asked questions
How do I find the GCF of two numbers?
Split both numbers into prime factors, keep the primes that appear in both, each at the lower of its two powers, and multiply what is kept. For 48 and 60: 48 is 2⁴ x 3 and 60 is 2² x 3 x 5; the shared primes at their lowest powers are 2² and 3, and 4 x 3 = 12. For large numbers the Euclidean division method in the table above is quicker, because it never asks for the factors at all. The tool runs both and shows both.
What is the difference between GCF and LCM?
The GCF is the largest number that divides into all the given numbers; the LCM is the smallest number that all the given numbers divide into. One looks down among divisors, the other looks up among multiples. For 24 and 36 the GCF is 12 and the LCM is 72, and the two are tied by an identity: for any pair, GCF x LCM equals the pair multiplied together, here 12 x 72 = 864 = 24 x 36. Use the GCF to simplify and to group; use the LCM to align denominators and cycles.
Are GCF, GCD and HCF the same thing?
Yes. Greatest common factor, greatest common divisor and highest common factor are three names for one value: the largest whole number dividing every number in the set. Textbooks pick one of the three, and mathematics writing usually abbreviates it gcd, as in the gcd function of a programming library. Whichever name a question uses, the calculation and the answer are identical, and this page computes that value.
What does a GCF of 1 mean?
That the numbers share no prime factor at all, like 8 (2³) and 15 (3 x 5). Such numbers are called coprime, or relatively prime, which does not mean either number is itself prime: 8 and 15 are both composite, they simply overlap nowhere. A fraction built from coprime numbers, 8/15, is already in its lowest terms and cannot be simplified. A GCF of 1 is a complete answer, not a failure of the method, and the tool reports it like any other result.
How is the GCF used to simplify a fraction?
Divide the numerator and the denominator by their GCF, and the fraction lands in its lowest terms in one step. 24/36 simplified by GCF 12 becomes 2/3; 18/24 by GCF 6 becomes 3/4. Dividing by a smaller common factor also works but takes repeat trips, 24/36 by 2, then by 2, then by 3, where the GCF arrives at once. The Fraction Calculator performs the simplifying itself; this page supplies and explains the number it uses.
Can the GCF handle negative numbers or decimals?
Negatives, yes, by size: divisibility ignores sign, so the GCF of -12 and 18 is 6, and the tool reads every negative entry by its absolute value and says so. Decimals, no: factors are a whole-number idea, and an entry like 12.5 is set aside with a note rather than rounded into a different question. If a decimal genuinely needs scaling up to whole numbers first, multiply every entry by the same power of ten, find the GCF, and divide it back by that power.
What is the GCF of 0 and another number?
By the usual mathematical convention, gcd(0, n) is n, because every number divides 0. This tool does not use that rule: it sets zero aside and needs at least two other whole numbers. Entering 0, 12 and 18 returns the GCF of 12 and 18, which is 6, and counts the zero as set aside. Entering only 0 and 12 returns no result, because only one usable number is left. For the GCF of 0 and 12, the answer is 12 by hand.
Educational tool only. Results are estimates based on the numbers you enter and the assumptions explained on this page, not financial advice.