What Is the Greatest Common Factor?
Every pair of whole numbers has a list of factors in common, and that list always has a largest entry. For 48 and 18 the shared factors are 1, 2, 3 and 6, so the GCF is 6. The list can never come out empty, because 1 divides everything — which is why a GCF exists even for two numbers that appear to have nothing to do with each other.
Factor, Common Factor, Greatest Common Factor
Three ideas are stacked inside the phrase and they are usually taught in a single lesson, which is why they blur together. Two neighboring terms belong here as well, because the panel prints both.
- Factor — a whole number that divides yours with nothing left over. 18 has six of them: 1, 2, 3, 6, 9, 18.
- Common factor — a number that appears on every list at once. 48 and 18 share 1, 2, 3 and 6.
- Greatest common factor — the largest of those shared entries. For 48 and 18 it is 6, which the panel prints as GCF = 6.
- Cofactor — what is left of each number once the GCF is divided out. 48 ÷ 6 = 8 and 18 ÷ 6 = 3, and those two are the figures in parentheses on the panel's second line.
- Coprime — a GCF of exactly 1. MathWorld puts it this way: two or more positive integers that have greatest common divisor 1 are said to be relatively prime to one another.
Two bounds pin the answer down before you calculate anything. The GCF can never be larger than the smallest number you entered, and it can never be smaller than 1. For 48 and 18 that fixes it somewhere between 1 and 18, and the true answer, 6, is a third of the smaller number.
That upper bound is reached exactly when the smaller number already divides the larger. Enter 13, 26 and the panel returns GCF = 13 with the cofactors (1, 2), because 13 is a factor of 26 and no common factor above 13 could exist.
GCF, GCD and HCF Are the Same Number
Three names, one quantity, and which one you meet depends on where you learned it. Nothing about the calculation changes with the label.
- GCF — greatest common factor. Standard in US school materials, and the wording used by this page and by the panel.
- GCD — greatest common divisor. The number-theory name, written GCD(a, b), gcd(a, b), or simply (a, b) in older texts.
- HCF — highest common factor. Usual in UK and Commonwealth classrooms. MathWorld records the highest common divisor form too, crediting Hardy and Wright.
- Common Core 6.NS.B.4 is where most US students meet it: find the greatest common factor of two whole numbers less than or equal to 100 and the least common multiple of two whole numbers less than or equal to 12.
Those two ceilings in the standard are worth a second look — 100 for the GCF against 12 for the LCM. The arithmetic explains the gap. The GCF of two numbers below 100 is itself below 100, while their LCM can run to 9,900, which is what LCM(99, 100) comes to.
The same standard is also where the GCF stops being an exercise and starts being a tool: it asks students to express a sum such as 36 + 8 as 4(9 + 2). That works because GCF(36, 8) = 4, and the panel confirms both halves at once — enter 36, 8 and it returns GCF = 4 with the cofactors (9, 2).
GCF and LCM Answer Opposite Questions
The GCF is the largest number that divides into your numbers. The LCM is the smallest number your numbers divide into. One looks down at the parts they are built from, the other looks up at where their times tables finally meet — and a single identity ties the two together.
| Pair | GCF | LCM | GCF × LCM | The two numbers multiplied |
|---|---|---|---|---|
| 12, 18 | 6 | 36 | 216 | 216 |
| 48, 18 | 6 | 144 | 864 | 864 |
| 24, 36 | 12 | 72 | 864 | 864 |
| 15, 25 | 5 | 75 | 375 | 375 |
| 100, 75 | 25 | 300 | 7,500 | 7,500 |
| 17, 31 | 1 | 527 | 527 | 527 |
The last two columns agree in every row because of an identity MathWorld states as GCD(a,b)LCM(a,b) = ab. It is a rule about pairs and nothing wider. Enter 12, 18, 30 and the panel returns GCF = 6 with an LCM of 180; those multiply to 1,080, while the three numbers themselves multiply to 6,480.
Read practically, the identity means either answer hands you the other for one multiplication and one division. GCF(100, 75) = 25, so their LCM must be 100 × 75 ÷ 25 = 300 — and that is exactly the route this calculator takes to fill its fourth line.
The same relationship run in the other direction, with the multipliers that carry each number up to the meeting point, is the LCM Calculator.
Where a GCF Question Actually Comes From
Most GCF problems arrive in disguise. Five shapes cover nearly all of them.
- Reducing a fraction. 18/24 shares a factor of 6 top and bottom, so it collapses to 3/4 in one division rather than halving to 9/12 and then thirding.
- Simplifying a screen size or a ratio. 1920 × 1080 has a GCF of 120; divide through and you get 16:9, which the panel prints directly as the cofactors (16, 9).
- Splitting several quantities into identical groups. 24 pencils and 36 erasers make 12 kits, because GCF(24, 36) = 12, and each kit holds 2 pencils and 3 erasers.
- Cutting two lengths into equal pieces with nothing wasted. Boards of 84 in and 126 in both divide by 42, giving 2 pieces from one and 3 from the other.
- Factoring a sum, which is how the Common Core introduces it: 36 + 8 becomes 4(9 + 2) once you know their GCF is 4.
The screen case is the one that shows the GCF doing work you can see. 1920 × 1080 reduces to 16:9, and so does 2560 × 1440, whose GCF is 160 — which is why the two look identical in shape. A 1366 × 768 laptop panel has a GCF of only 2, so it reduces no further than 683:384. That works out at 1.7786 against 16 ÷ 9 = 1.7778: too small a difference to see, and enough to stop the fraction reducing.
Width and height get a tool of their own, and it divides the pair by exactly this number before printing the ratio — the Aspect Ratio Calculator.
How Do You Calculate the GCF?
Three methods are standard and they always agree. Listing factors is taught first and collapses first. Prime factorization scales to long lists and reads them all at once. Euclid's algorithm is what this calculator runs, because it reaches the answer in a handful of divisions however large the numbers get.
The GCF Formula, Written Out
There is no single arithmetic expression for the GCF the way there is for an average. It is defined by a search, and the formula is the rule that ends the search. Three statements cover everything this calculator does.
EUCLID'S ALGORITHM — the pair rule GCF(a, b) = GCF(b, a mod b), repeated until the remainder is 0 the last nonzero remainder is the GCF MORE THAN TWO NUMBERS — fold left GCF(a, b, c) = GCF( GCF(a, b), c ) FROM PRIME FACTORIZATIONS take every SHARED prime, at its LOWEST power 48 = 2^4 × 3 18 = 2 × 3^2 GCF = 2 × 3 = 6
The middle line is what lets one box accept a whole list. The tool folds left: it works out the GCF of the first two numbers, then the GCF of that answer and the third, and so on to the end. Enter 48, 18, 30 and it takes 48 with 18 to get 6, then 6 with 30, which is still 6, and prints GCF = 6 with the cofactors (8, 3, 5).
One property turns hard pairs into easy ones: the GCF of two numbers also divides their difference, so you can shrink a pair before you start. GCF(48, 18) = GCF(30, 18) = GCF(12, 18) = 6, and each step is easier to see than the one before it. Euclid's algorithm is that idea with a run of subtractions compressed into a single division; MathWorld traces the method to Book VII of Euclid's Elements.
Method 1: List the Factors and Take the Largest
The method everyone learns first. Write out every factor of each number, mark the ones appearing on both lists, and take the biggest.
| List | Entries | Largest shared |
|---|---|---|
| Factors of 48 | 1, 2, 3, 4, 6, 8, 12, 16, 24, 48 | |
| Factors of 18 | 1, 2, 3, 6, 9, 18 | |
| On both lists | 1, 2, 3, 6 | 6 |
It is honest, it shows a beginner what the answer means, and it stops being practical quickly, because the list of candidates you have to test grows with the number. Euclid settles the same pair in three divisions. The gap widens with size: 1071 and 462 have a GCF of 21, which the panel reaches in three lines — 1071 = 2×462 + 147 → 462 = 3×147 + 21 → 147 = 7×21 + 0 — while writing out every factor of 1071 by hand is an afternoon.
Two shortcuts trim the work when you do use it. Only the smaller number's factors can matter, since nothing above it is available, so start at 18 and test downwards against 48: 18 no, 9 no, 6 yes, stop. And if the smaller number divides the larger, you were finished before you started.
Method 2: Prime Factorization, Every Shared Prime at Its Lowest Power
Break each number into primes, then keep only the primes appearing in every factorization, each raised to the smallest power it reaches anywhere. The method rests on the fundamental theorem of arithmetic, which the NIST Digital Library of Mathematical Functions states as every integer n > 1 being representable uniquely as a product of prime powers.
| Numbers | Prime factorizations | Shared primes at lowest power | GCF |
|---|---|---|---|
| 48 and 18 | 48 = 2^4 × 3, 18 = 2 × 3^2 | 2 × 3 | 6 |
| 24 and 36 | 24 = 2^3 × 3, 36 = 2^2 × 3^2 | 2^2 × 3 | 12 |
| 15 and 25 | 15 = 3 × 5, 25 = 5^2 | 5 | 5 |
| 100 and 75 | 100 = 2^2 × 5^2, 75 = 3 × 5^2 | 5^2 | 25 |
| 17 and 31 | 17 and 31 are both prime | nothing is shared | 1 |
| 24, 36 and 60 | 24 = 2^3 × 3, 36 = 2^2 × 3^2, 60 = 2^2 × 3 × 5 | 2^2 × 3 | 12 |
Set beside the LCM rule, the contrast is the whole point. The LCM takes every prime appearing anywhere, at its highest power; the GCF takes only primes appearing everywhere, at their lowest. That is why 17 and 31 come out with a GCF of 1 — an empty product is 1 — and an LCM of 527, which is simply the two multiplied together.
This is the method that keeps working as a list gets long, because you can read all the numbers at once instead of folding pairs. It is also the method that gives out first on large inputs: factoring 1160718174 by hand is not realistic, while Euclid takes that number apart against 316258250 in ten divisions and returns a GCF of 1078.
Method 3: Euclid's Algorithm, Which Is What This Calculator Runs
Divide the larger number by the smaller and keep the remainder. Divide the old divisor by that remainder. Repeat. The moment a remainder comes out at 0, the divisor you just used is the GCF. MathWorld describes the procedure as repeatedly computing remainders of consecutive terms until zero is reached.
a = q × b + r divide, keep the remainder r repeat with (b, r) stop when r = 0 — the last divisor is the GCF 48 = 2 × 18 + 12 18 = 1 × 12 + 6 12 = 2 × 6 + 0 → GCF(48, 18) = 6
It terminates because the remainders strictly shrink and cannot drop below zero, so the sequence has to arrive at 0. It is fast because of Lamé's theorem, which MathWorld gives as a bound of 4.785·log₁₀(n) + 1.6723 steps and notes is always at most five times the number of digits in the smaller number. Two three-digit numbers are therefore settled in fifteen divisions at the absolute worst, and usually in far fewer: 270 and 192 take four.
The worst case is not random either. MathWorld: the worst case occurs when the algorithm is applied to two consecutive Fibonacci numbers. Enter 144, 89 — neighbors in that sequence — and the full run needs ten divisions to reach GCF = 1, which is exactly the bound for a two-digit smaller number.
Step by Step With This Calculator
Six steps, and the first has usually happened before you arrive.
- Open the page. The box arrives holding 12, 18 and the tool calculates once on load, so GCF = 6 is showing already.
- Replace the contents with your own numbers. Commas or spaces both work — 48, 18 and 48 18 are read identically, and a trailing comma is ignored.
- Press Calculate, or Enter, which submits the same form. Nothing recalculates while you type.
- Read the four lines. The GCF is the large figure; below it come the cofactors, Euclid's working and the LCM.
- Use Copy result to put all four lines on the clipboard as plain text, one per line.
- Reset returns the box to 12, 18 and the panel to its opening prompt. The answer does not come back until you press Calculate again.
The arithmetic itself runs in your browser: the page loads one small formula module on demand and executes it locally, so no number you type is sent away to be worked out. That is a statement about where the division happens, not about the page as a whole, which carries analytics and advertising tags in the ordinary way.
Worked Example: GCF of 48 and 18
Type 48, 18 into the box and press Calculate. Four lines come back.
| Line | What the panel prints |
|---|---|
| Hero | GCF = 6 |
| Second | Numbers: 48, 18 → divide them all evenly by 6 (8, 3) |
| Third | Euclid on the first pair: 48 = 2×18 + 12 → 18 = 1×12 + 6 → 12 = 2×6 + 0 |
| Fourth | Their LCM is 144 — GCF × LCM = product for any two numbers |
Read the working downwards. 48 divided by 18 is 2 with 12 left over. 18 divided by 12 is 1 with 6 left over. 12 divided by 6 is 2 with nothing left over, so 6 is the answer — the last divisor used, and equally the last nonzero remainder seen.
Two checks confirm it. The identity: 6 × 144 = 864, and 48 × 18 = 864. The cofactors: 8 and 3 share no factor themselves, which they must not, since anything still common to them would have belonged inside the GCF.
Worked Example: Three Numbers at Once
Type 24, 36, 60 and press Calculate. The shape of the answer does not change.
| Line | Output for 24, 36, 60 |
|---|---|
| Hero | GCF = 12 |
| Second | Numbers: 24, 36, 60 → divide them all evenly by 12 (2, 3, 5) |
| Third | Euclid on the first pair: 24 = 0×36 + 24 → 36 = 1×24 + 12 → 24 = 2×12 + 0 |
| Fourth | Their LCM is 360 — GCF × LCM = product for any two numbers |
Two details in that output catch people out. The working covers 24 and 36 only — the line says so — and the third number is folded in afterwards with no line of its own: GCF(24, 36) = 12, then GCF(12, 60) = 12. And the trace opens with 24 = 0×36 + 24, which looks like an error and is not. Dividing 24 by 36 gives a quotient of 0 and a remainder of 24, and that is how the algorithm moves the larger number to the front.
Type the same three as 36, 24, 60 and that opening line disappears, because the larger number now leads: the trace reads 36 = 1×24 + 12 → 24 = 2×12 + 0. The answer is unchanged at GCF = 12, though the cofactors reorder to (3, 2, 5) to match the order you typed.
GCF Chart: Every Pair From 1 to 12
Most GCF homework lives inside the twelve times tables, and all of it fits in one grid. Find your first number down the left, the second along the top, and read the GCF where the row and column meet.
The 12 × 12 GCF Grid
| GCF | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
| 2 | 1 | 2 | 1 | 2 | 1 | 2 | 1 | 2 | 1 | 2 | 1 | 2 |
| 3 | 1 | 1 | 3 | 1 | 1 | 3 | 1 | 1 | 3 | 1 | 1 | 3 |
| 4 | 1 | 2 | 1 | 4 | 1 | 2 | 1 | 4 | 1 | 2 | 1 | 4 |
| 5 | 1 | 1 | 1 | 1 | 5 | 1 | 1 | 1 | 1 | 5 | 1 | 1 |
| 6 | 1 | 2 | 3 | 2 | 1 | 6 | 1 | 2 | 3 | 2 | 1 | 6 |
| 7 | 1 | 1 | 1 | 1 | 1 | 1 | 7 | 1 | 1 | 1 | 1 | 1 |
| 8 | 1 | 2 | 1 | 4 | 1 | 2 | 1 | 8 | 1 | 2 | 1 | 4 |
| 9 | 1 | 1 | 3 | 1 | 1 | 3 | 1 | 1 | 9 | 1 | 1 | 3 |
| 10 | 1 | 2 | 1 | 2 | 5 | 2 | 1 | 2 | 1 | 10 | 1 | 2 |
| 11 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 11 | 1 |
| 12 | 1 | 2 | 3 | 4 | 1 | 6 | 1 | 4 | 3 | 2 | 1 | 12 |
The grid is symmetric — GCF(8, 12) and GCF(12, 8) are both 4 — so only one half of it carries new information. Of the 66 pairs of different numbers inside it, 45 have a GCF of 1, which is worth knowing before you go hunting: sharing nothing is the ordinary case here, not the exception.
Six Things the Grid Shows
- The diagonal is the number itself. GCF(9, 9) = 9, because a number's own largest factor is itself.
- Row 1 and column 1 are solid 1s. 1 divides everything, and nothing above 1 divides 1.
- Rows 7 and 11 are 1 everywhere except on the diagonal. Both are primes whose next multiple, 14 and 22, falls outside the grid, so they share nothing with anything else in range.
- Row 5 breaks that pattern in exactly one place, at GCF(5, 10) = 5, because 10 is the one other multiple of 5 that fits.
- Where one number divides the other, the GCF is the smaller one: GCF(3, 12) = 3, GCF(4, 8) = 4, GCF(6, 12) = 6.
- The largest entry anywhere off the diagonal is 6, at GCF(6, 12) and its mirror GCF(12, 6). Beating it would need a shared factor of 7 or more, which forces both numbers to be multiples of that factor — and the second multiple of 7 is already 14, outside the grid.
That last point doubles as a check on your own work. Two different numbers from 1 to 12 cannot have a GCF above 6, so an answer of 8 or 9 in this range means a slip somewhere. The only way past 6 is a pair of identical numbers, where GCF(8, 8) = 8 and the answer is the number itself.
GCF Chart for Common Pairs Above 12
Past the times tables, these are the pairs that come up most. Every row was run through this calculator, and the third column is the bracketed cofactor line exactly as the panel prints it.
| Numbers | GCF | Each divided by it | LCM |
|---|---|---|---|
| 15, 25 | 5 | 3, 5 | 75 |
| 16, 24 | 8 | 2, 3 | 48 |
| 18, 27 | 9 | 2, 3 | 54 |
| 20, 30 | 10 | 2, 3 | 60 |
| 24, 36 | 12 | 2, 3 | 72 |
| 28, 42 | 14 | 2, 3 | 84 |
| 32, 48 | 16 | 2, 3 | 96 |
| 36, 48 | 12 | 3, 4 | 144 |
| 45, 60 | 15 | 3, 4 | 180 |
| 48, 18 | 6 | 8, 3 | 144 |
| 50, 75 | 25 | 2, 3 | 150 |
| 54, 24 | 6 | 9, 4 | 216 |
| 60, 90 | 30 | 2, 3 | 180 |
| 63, 81 | 9 | 7, 9 | 567 |
| 72, 96 | 24 | 3, 4 | 288 |
| 84, 126 | 42 | 2, 3 | 252 |
| 100, 75 | 25 | 4, 3 | 300 |
The run of 2, 3 down the third column is not coincidence. Any pair in a 2:3 ratio reduces to exactly that, whatever its size — 24 and 36, 50 and 75, 60 and 90, 84 and 126 are all the same ratio wearing different numbers, and the GCF is what tells them apart: 12, 25, 30 and 42 respectively.
Reducing a ratio is this same division applied to both sides, and comparing or solving one has its own tool in the Ratio Calculator.
GCF Examples: Fractions, Ratios and Equal Shares
A GCF is rarely the thing anybody actually wants. It is the step that makes the next thing possible, and these are the three places it earns its keep.
The GCF as a One-Step Fraction Reducer
Dividing the top and bottom of a fraction by their GCF puts it in lowest terms in a single move. Any smaller common factor works too — it just leaves you to go round again, sometimes more than once.
| Fraction | GCF of the two parts | Lowest terms | The slow route |
|---|---|---|---|
| 12/18 | 6 | 2/3 | ÷2 → 6/9, then ÷3 |
| 18/24 | 6 | 3/4 | ÷2 → 9/12, then ÷3 |
| 24/36 | 12 | 2/3 | ÷2 → 12/18, ÷2 → 6/9, then ÷3 |
| 45/60 | 15 | 3/4 | ÷3 → 15/20, then ÷5 |
| 63/81 | 9 | 7/9 | ÷3 → 21/27, then ÷3 |
| 84/126 | 42 | 2/3 | ÷2 → 42/63, ÷3 → 14/21, then ÷7 |
| 35/64 | 1 | 35/64, already lowest | nothing to divide by |
The last row is the case to recognize on sight. When the GCF is 1 the fraction is already as simple as it can be, and no further hunting will improve it. The panel says as much without ambiguity: enter 35, 64 and it returns GCF = 1 with the cofactors (35, 64), your own numbers handed straight back.
Adding, subtracting or comparing two fractions is a separate job, and every answer that tool returns arrives already divided by the GCF of its own two parts — the Fraction Calculator.
GCF Examples With Three or More Numbers
The box accepts up to ten numbers at once. Every row here was entered as a single list.
| Numbers | GCF | Each divided by it | LCM |
|---|---|---|---|
| 12, 18, 24 | 6 | 2, 3, 4 | 72 |
| 12, 18, 30 | 6 | 2, 3, 5 | 180 |
| 12, 18, 25 | 1 | 12, 18, 25 | 900 |
| 16, 20, 24 | 4 | 4, 5, 6 | 240 |
| 24, 36, 60 | 12 | 2, 3, 5 | 360 |
| 7, 21, 35 | 7 | 1, 3, 5 | 105 |
| 56, 42, 28 | 14 | 4, 3, 2 | 168 |
| 18, 24, 36, 60 | 6 | 3, 4, 6, 10 | 360 |
| 12, 18, 24, 30, 36, 42 | 6 | 2, 3, 4, 5, 6, 7 | 2,520 |
| 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 | 1 | the same ten numbers | 27,720 |
Adding a number to the list can only pull the GCF down or leave it alone, never raise it. 12, 18 gives 6; adding 24 keeps it at 6; adding 30 instead also keeps 6; but slipping 25 in drops it to 1, because 25 is built only from 5s and neither of the others contains one. The 7, 21, 35 row shows the other extreme, where 7 is already a factor of both companions and so becomes the answer, with a cofactor of 1.
The order you type changes the working, not the answer. 56, 42, 28 and 28, 42, 56 both return GCF = 14; only the third line differs, since it always shows the first pair you entered. Long lists split safely too: 12, 18, 24 gives 6, 30, 36, 42 gives 6, and the GCF of those two answers is 6 — the same result as running all six together.
Equal Groups, Clean Cuts and Square Tiles
Whenever the question is the biggest equal share of several quantities, it is a GCF question in costume.
- Party bags. 24 pencils and 36 erasers make 12 identical bags, each holding 2 pencils and 3 erasers, with nothing left over.
- Cutting stock. Boards of 84 in and 126 in cut into 42-inch lengths give 2 pieces and 3 pieces, and 42 inches is the longest cut that wastes none of either board.
- Square tiles. The largest square tile filling a 48 × 18 area with no cutting is 6 × 6, and it takes 8 × 3 = 24 of them.
- Rows in a display. 16 red, 20 white and 24 blue items go into 4 equal rows of each color, at 4, 5 and 6 per row.
- Small shares. 7 apples and 21 oranges divide into 7 bundles of one apple and three oranges, because 7 is already a factor of 21.
The tile case is the one worth testing your intuition against, because the obvious answers are wrong. A 48 × 18 area tempts you toward a 9 × 9 or a 12 × 12 tile: 9 divides 18 but not 48, and 12 divides 48 but leaves 18 at a tile and a half. Only a common factor of both sides fits, and only the greatest one keeps the grout lines to a minimum.
Every factor of a single number, listed out before you go looking for the shared ones, comes from the Factor Calculator.
How to Read Your Result
The panel returns four lines every time — one large figure and three supporting rows. Nothing here is conditional: the same four appear for a pair and for a list of ten.
The Four Lines the Panel Returns
| Line | Printed for 12, 18 | What it is |
|---|---|---|
| Hero | GCF = 6 | The answer: the largest whole number dividing every number you entered. |
| Second | Numbers: 12, 18 → divide them all evenly by 6 (2, 3) | Your list echoed back, with each number divided by the GCF in parentheses. |
| Third | Euclid on the first pair: 12 = 0×18 + 12 → 18 = 1×12 + 6 → 12 = 2×6 + 0 | The division steps, covering the first two numbers only. |
| Fourth | Their LCM is 36 — GCF × LCM = product for any two numbers | The least common multiple of the same list. |
Copy result places all four on the clipboard as plain text, one line each, which is convenient when the working rather than the answer is what has to be handed in.
What the Numbers in Parentheses Mean
The bracketed list is your numbers with the GCF taken out, and it carries more than it appears to. For 12, 18 it reads (2, 3), because 12 = 6 × 2 and 18 = 6 × 3. Those two are guaranteed to be coprime — their own GCF is 1 — since anything still shared between them would have been part of the GCF to begin with.
- As a fraction: 12/18 reduces to 2/3, straight off that line.
- As a ratio: 12 to 18 is 2 to 3.
- As groups: 12 and 18 split into 6 equal shares holding 2 and 3.
- As a check: multiply each bracketed figure back by the GCF and you must land exactly on what you typed.
For 48, 18 the same line reads (8, 3), and 8 and 3 share nothing. For 63, 81 it reads (7, 9), which surprises people, since 9 is not prime — but coprime never required either number to be prime, only that the two have no factor in common.
Why the Working Starts With ×0, and Where It Stops
Three quirks live in the third line, and all three are worth knowing before you copy it into homework.
- It opens with a swap whenever you type the smaller number first. 12, 18 begins 12 = 0×18 + 12 — dividing 12 by 18 gives 0 remainder 12, which reverses the pair at the cost of one line. Enter 18, 12 instead and the trace is just 18 = 1×12 + 6 → 12 = 2×6 + 0.
- It covers the first pair only. On a list of three or more, the remaining numbers are folded in without any visible working.
- It stops after five lines, finished or not. 1366, 768 needs eight divisions, so the panel ends on 88 = 1×82 + 6 rather than on a remainder of 0. The figure above it is still right: the GCF is computed separately from the display, and it reads GCF = 2.
144 and 89 are the extreme case. Ten divisions are needed, five are shown, and the visible trace ends at 21 = 1×13 + 8 with GCF = 1 sitting above it, correct and unexplained. If you want the rest of the trace, restart from where the display gave out: that last line leaves the pair 13 and 8, and entering 13, 8 returns the remaining five steps in full, ending 2 = 2×1 + 0.
The LCM on the Fourth Line
The last line is a free extra: the least common multiple of the same list, with the identity that produced it stated alongside. The calculator gets there by dividing the product by the GCF, which is why the two always appear together here rather than as separate jobs.
For 12, 18 it prints Their LCM is 36 — GCF × LCM = product for any two numbers, and the check runs 6 × 36 = 216 = 12 × 18. Larger results carry thousands separators: 1071, 462 returns an LCM of 23,562, and 18, 24, 36, 60 returns 360.
Note how carefully that sentence is worded — for any two numbers. Give the calculator three or more and the LCM stays correct while the identity stops holding for the list as a whole, which is why the line names a pair rather than your list.
The Two Messages That Replace an Answer
When the input cannot be read, the panel turns amber, shows Check your inputs, and prints one of exactly two messages.
| Message | What triggers it |
|---|---|
| Enter two or more whole numbers, separated by commas | Fewer than two numbers, or any entry that is not a whole number above zero: a decimal such as 12.5, a negative, a zero, or text. |
| Up to 10 numbers | Eleven entries or more. |
One trap deserves naming. Thousands separators break the input: 1,000, 250 splits into 1, 000 and 250, the 000 reads as zero, and the whole entry is rejected. Drop the separator and 1000, 250 works. Spaces are safe, and 12.0 is accepted because it is a whole number written with a decimal point — 12.5 is not.
The guard fires before any arithmetic runs, so an amber panel never means a wrong answer. It means no answer was attempted.
Limits: When This Calculator Does Not Apply
The GCF is defined on positive whole numbers, and this tool draws that boundary tightly. Here is what it will not do.
- Zero and negative numbers. Mathematically GCF(a, 0) is taken as a, and the GCF of negative numbers is normally reported as positive. This tool accepts neither and asks for whole numbers above zero.
- Decimals and fractions. 1.5 and 2.25 have no GCF in the whole-number sense. Scale them up first — 150 and 225 return GCF = 75 — then scale the answer back down by the same factor if you need it in the original units.
- Algebraic expressions. The GCF of 12x³ and 18x² is 6x², and no number-only tool can produce the x² half. The numeric part is what you get here: GCF(12, 18) = 6.
- More than ten numbers. The eleventh entry returns Up to 10 numbers. Split the list, take the GCF of each part, then take the GCF of those answers; the grouping cannot change the result.
- Exact LCMs beyond 9,007,199,254,740,991. The GCF stays exact at any size, because Euclid's algorithm uses only whole-number division, but the fourth line is computed in ordinary floating-point arithmetic. Ten primes from 97 down to 53 return the correct GCF = 1 and an LCM printed as 3,749,562,977,351,496,700, where the exact value is 3,749,562,977,351,496,827.
None of these are faults in the arithmetic — they are the edges of what a single text box can accept, and in every one of them the tool refuses rather than guessing. Within those edges the GCF is exact: there is no rounding anywhere in the method, only whole-number division.
Where the result matters — a cut list, a tile order, an answer being marked — the quickest check is the cofactor line. Multiply each bracketed figure back by the GCF and you should recover exactly what you typed, and those bracketed figures should share no factor between them. If both hold, the answer is right.