Greatest Common Factor Calculator

Greatest common factor

6

Least common multiple

72

All results
Calculator inputs
?

One to 100 whole integers, separated by commas, spaces, semicolons or new lines. Up to 60 digits each. A comma is a separator, not a thousands-grouping mark. Negative inputs use their magnitudes; zero follows the documented algorithm convention. API callers should supply the data as a quoted string to retain every digit.

Keep the shared minimum powers

Complete running GCF and LCM calculation

Every input is included, in entered order. LCM updates by (prior LCM / pair GCF) × current magnitude; a zero input makes the extended LCM zero. Exact integer strings survive CSV export.

Complete running GCF and LCM calculation
Input rowEntered integerMagnitude usedRunning GCFGCF of prior LCM and current magnitudeRunning LCM
1121212112
218186636
3242461272

Euclidean divisions for the first pair

Dividend = divisor × quotient + remainder. The last nonzero divisor is the first pair’s GCF. Further inputs are folded into the complete reduction table; this worksheet shows the first pair only.

Euclidean divisions for the first pair
StepDividendDivisorInteger quotientRemainder
11218012
2181216
312620

All common positive factors when enumerable

The common factors of the inputs are exactly the positive divisors of their GCF.

All common positive factors when enumerable
Common factorGCF divided by this factor
16
23
32
61

Prime factorization of each input

Complete trial-division factorizations for the entered positive magnitudes up to 1,000,000,000. Signs do not change the prime powers.

Prime factorization of each input
Input rowMagnitudePrime powers
1122^2 × 3
2182 × 3^2
3242^3 × 3

Why GCF takes minimum powers and LCM takes maximum powers

A missing prime has exponent zero. To divide every input, use minimum powers. To be divisible by every input, use maximum powers. The empty product for all ones is 1.

Why GCF takes minimum powers and LCM takes maximum powers
PrimeExponent in each input (same order)Minimum: GCF exponentMaximum: LCM exponent
22, 1, 313
31, 2, 112

First ten common multiples

These are examples k × LCM for k = 1 through 10, not a list of every integer multiple.

First ten common multiples
MultiplierLCM × multiplier
172
2144
3216
4288
5360
6432
7504
8576
9648
10720

How to use the Greatest Common Factor Calculator

Find the greatest common factor (GCF/GCD) of up to 100 integers. See exact answers, Euclidean steps, common divisors, prime powers and grouping examples.

  1. 1. Enter your inputs

    Start with Integers to compare. Use the units shown beside each field and open the field help when you need its assumptions.

  2. 2. Read the results

    Results update as you enter valid values. Review Greatest common factor, Least common multiple, Input count. Keep the entered units and settings consistent when comparing scenarios.

  3. 3. Check the calculation

    At most 100 integers and 60 decimal digits per input. No fractional, decimal or scientific-notation list entries. Fraction reduction and repeat-interval applications require quantities to represent the same units.

    See the worked example and method

Understanding the Greatest Common Factor Calculator: uses, inputs and results

The Greatest Common Factor Calculator identifies the largest positive factor shared by entered integers, helping reduce equivalent quantities.

What is the largest exact divisor shared by every input?

The GCF Calculator uses integer remainders to find a shared divisor, then separates the exact answer from optional factor enumeration.

Grouping and piece length are different interpretations

A GCF can count identical groups or specify a largest common piece length, depending on the question’s units and quantities.

Exact answers need not have a complete factor list

The Euclidean algorithm works on large integers without pretending a bounded factor display has exhausted every divisor.

Further reading: OpenStax: multiples and factors

What do the Greatest Common Factor Calculator inputs mean?

Integers to compare
One to 100 whole integers, separated by commas, spaces, semicolons or new lines. Up to 60 digits each. A comma is a separator, not a thousands-grouping mark. Negative inputs use their magnitudes; zero follows the documented algorithm convention. API callers should supply the data as a quoted string to retain every digit.

When is the Greatest Common Factor Calculator useful?

Reduce a fraction or ratio

Enter the relevant positive integers and use their greatest common factor to simplify them.

Check equal grouping

Use the common factors to examine possible group sizes without leftovers.

Greatest Common Factor Calculator: a practical reference

The fixed “12 18 24” example on this page produces the results below. It illustrates the stated model; your live results above use your current inputs.

Integers to compare
12, 18, 24
Greatest common factor
6
Least common multiple
72
Review the example inputs and calculation

Use the result in context

At most 100 integers and 60 decimal digits per input. No fractional, decimal or scientific-notation list entries. Fraction reduction and repeat-interval applications require quantities to represent the same units.

Try the Greatest Common Factor Calculator·Read the subject guide·Explore a related calculator

Worked example: Greatest Common Factor Calculator

12 18 24. This fixed reference example shows one complete scenario; the interactive results above use your current inputs.

View the example inputs
Integers to compare
12, 18, 24
Calculated results for the fixed example
Calculated quantityExample result
Greatest common factor6
Least common multiple72
Input count3

GCF Calculator: connect common factors, equal groups and Euclidean remainders

How do I find the greatest common factor?

The greatest common factor is the largest positive integer dividing every nonzero input without a remainder. GCF and greatest common divisor, or GCD, name the same quantity. For 12, 18 and 24, the GCF Calculator gives 6; the common positive factors are 1, 2, 3 and 6.

A number does not need to appear in the list to be a common factor. It must divide every entry. The input-by-input reduction table shows how the current GCF changes as another value is added, helping distinguish the greatest shared factor from the smallest number in the list.

OpenStax: multiples and factors

How does the Euclidean algorithm find the GCF?

Divide one magnitude by the other and keep the remainder. Replace the pair with the divisor and that remainder, then repeat until the remainder is zero. For 48 and 18: 48 = 18 × 2 + 12, 18 = 12 × 1 + 6, and 12 = 6 × 2 + 0. The last nonzero divisor is 6.

The worksheet shows exact quotient and remainder columns for the first pair. Additional inputs are included in the separate complete reduction ledger. The method avoids enumerating every possible factor, which is why exact GCF can still be calculated when an input is too large for the optional prime-factor display.

Why does GCF use minimum prime powers?

A common divisor cannot require more copies of a prime than the least-equipped input contains. For 24 = 2³ × 3, 36 = 2² × 3² and 60 = 2² × 3 × 5, the shared minimum powers give 2² × 3 = 12. Prime 5 is absent from two inputs, so its common exponent is zero.

The paired GCF/LCM power display makes this contrast visible. GCF uses minimum exponents to divide every input; LCM uses maximum exponents to be divisible by every input. The optional factorization and common-divisor lists have explicit size bounds, while the exact GCF calculation does not depend on completing those lists.

How can GCF simplify a fraction or ratio?

Divide numerator and denominator by their GCF. For 84/126, the GCF is 42, giving 2/3. The fraction’s value stays unchanged because both parts are divided by the same nonzero factor. A ratio such as 84:126 simplifies in the same way when both quantities use the same unit.

The GCF Calculator identifies the divisor; the Fraction Calculator handles signs, mixed numbers and complete fraction operations. A zero denominator is still invalid. Finding a numerical GCF does not make an otherwise undefined fraction meaningful.

When is the GCF Calculator useful for equal groups?

Suppose 24 red items and 36 blue items must be split into the largest possible number of identical groups, with no items left over. GCF(24,36) = 12, so make 12 groups, each with 2 red and 3 blue items. The common factor counts the groups, not the total number of items in each group.

Another interpretation is cutting equal-length pieces from several stated lengths without waste; then the greatest common factor is the largest piece length in the chosen integer unit. Decide which quantity the shared divisor represents before interpreting the answer. Different measurement units must be reconciled first.

What if the integers are coprime, negative, zero or very large?

Coprime inputs have GCF 1; they need not both be prime. For example, 8 and 9 share no factor above 1. Negative inputs have the same nonnegative GCF as their magnitudes. With zero and a nonzero value, the GCF is the magnitude of the nonzero value.

For all-zero inputs the algorithm returns 0 by convention, but every positive integer divides zero, so there is no greatest positive common factor or finite divisor list. Large inputs retain exact digits through integer arithmetic. For GCF above 1,000,000,000 the answer remains exact, while exhaustive divisor enumeration is deliberately omitted.

Formula and calculation method

GCF/GCD is found by exact integer Euclidean remainders. LCM(a,b) = |(a/GCF(a,b)) × b| for nonzero a and b. Multiple inputs are folded in order.

All arithmetic uses integer strings and BigInt. LCM stays a string; large GCF values are also strings, retaining digits beyond the safe floating-point integer range.

Negative signs do not change nonnegative GCF/LCM magnitudes. The extended convention is GCF(0,a)=|a|, GCF(0,0)=0 and LCM(0,a)=0; all-zero inputs have no greatest positive common divisor.

Prime factorizations are provided only when every magnitude is from 1 through 1,000,000,000. Common-divisor enumeration requires a positive GCF no greater than that bound. Neither limit affects the exact GCF/LCM calculation.

For positive integers, GCF uses minimum prime exponents and LCM uses maximum exponents. For two inputs only, GCF × LCM = |a × b|; this product identity does not generally hold for three or more inputs.

Scope and Limitations

  • At most 100 integers and 60 decimal digits per input. No fractional, decimal or scientific-notation list entries. Fraction reduction and repeat-interval applications require quantities to represent the same units.

Reference Sources

Frequently asked questions

Are GCF and GCD the same thing?

Yes. Greatest common factor and greatest common divisor name the same nonnegative integer quantity.

What does GCF 1 mean?

The inputs are coprime: no positive integer above 1 divides them all. The inputs themselves do not have to be prime.

Can I use GCF to reduce a fraction?

Yes. Divide both numerator and nonzero denominator by their GCF. Use the Fraction Calculator for the complete operation.

What is the GCF of zero and a number?

The magnitude of the nonzero number. For an all-zero list, the implemented algorithm reports 0 by convention and explains why no greatest positive divisor exists.

Why is the factor list sometimes omitted?

Exact GCF supports larger integers than exhaustive divisor enumeration. The list is provided only for positive GCF values up to 1,000,000,000.