Skip to main content
CalcMax

Factor Calculator

Range: 1 – 1,000,000

Result

1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30, 60

Factors

Factor pairs
1 * 60, 2 * 30, 3 * 20, 4 * 15, 5 * 12, 6 * 10

A factor of a whole number is another whole number that divides it exactly, leaving no remainder. The factors of 60 are 1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30 and 60 — twelve of them, and they always come in pairs that multiply back to 60: 1 with 60, 2 with 30, 3 with 20, 4 with 15, 5 with 12, and 6 with 10. This page prints both readings, the flat list of factors and the pairs, because they answer different questions. The list is what you want when you are checking whether a number divides another; the pairs are what you want when you are looking for a rectangle with that area, or two numbers whose product is fixed. The method is trial division, and the useful part is knowing when to stop. To find every factor of 60 there is no need to test past 8, because 8 × 8 is 64 — beyond the square root, every factor you would find is the larger half of a pair whose smaller half you have already met. That is why 60 takes seven tests rather than fifty-nine, and it is why a number with seven digits is still fast on this page even though the ceiling here is one million. The same cutoff is what makes the pairs come out in order: each time a small factor is found, its partner is produced at the same moment, so the pairs are sorted by their smaller half without any sorting step. Two special cases are worth knowing before you read the output. A prime number has exactly two factors — 1 and itself — so its factor list is short and its pairs list has one entry. A perfect square has an odd number of factors, because the middle pair is the same number twice: 36 has nine factors and its pairs end at 6 * 6, which the page prints once. Neither is an error and neither is a special case in the code; both fall out of the same loop. What the page does not do is break the number into primes. It tells you every factor and every pair, and it will happily show you that 60 has twelve factors without ever saying 60 = 2² × 3 × 5 — the factor list contains the pieces, but it is not a factorisation. That distinction matters when the number is large: this page's work grows with the square root of the input, whereas prime factorization is genuinely hard, and the two are different questions.

Three numbers with their factors and factor pairs side by side

NumberFactorsFactor pairs
121, 2, 3, 4, 6, 121 * 12, 2 * 6, 3 * 4
361, 2, 3, 4, 6, 9, 12, 18, 361 * 36, 2 * 18, 3 * 12, 4 * 9, 6 * 6
601, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30, 601 * 60, 2 * 30, 3 * 20, 4 * 15, 5 * 12, 6 * 10

Read across a row and the middle column is the third column unfolded. 12 has six factors and three pairs; 36 has nine factors and five pairs; 60 has twelve factors and six pairs. The counts are the thing to compare. Six is even, nine is odd, twelve is even — and 36 is the only perfect square in the table, which is exactly why it is the odd one out. Every factor other than the square root has a partner to pair with, so those contribute an even count, and the square root has only itself. The other thing worth seeing is that more factors does not follow from a bigger number: 36 is three times 12 and has half again as many factors, while 60 is five times 12 and doubles them. How many factors a number has comes from how its prime pieces combine, not from its size — which is the same reason 720720, well under a million, has more factors than any number near it.

Formula

60 ÷ 1 = 60 ⇒ 1 * 60; 60 ÷ 2 = 30 ⇒ 2 * 30; 60 ÷ 3 = 20 ⇒ 3 * 20; 60 ÷ 4 = 15 ⇒ 4 * 15; 60 ÷ 5 = 12 ⇒ 5 * 12; 60 ÷ 6 = 10 ⇒ 6 * 10; 60 ÷ 7 is not exact, 8 × 8 > 60, stop

n
The number being factored — a whole number from 1 to 1000000. One is allowed and gives a single factor, 1, which is a real answer rather than a degenerate one: 1 is its own factor and divides nothing else evenly except the numbers that are multiples of it
d
A trial divisor, tested in order 1, 2, 3, 4 and so on. The page never tests past the square root of n, and that cutoff is the whole trick: if d × e = n and d is bigger than the square root, then e is smaller than it, so e was already found and the pair was already printed
d * d ≤ n
The stopping rule, written out. For 60 the last divisor tested is 7, because 7 × 7 = 49 is under 60 and 8 × 8 = 64 is over it. The rule is why the number of trials grows with the square root of the input rather than with the input — a million takes a thousand trials, not a million
n / d
The partner of a factor. When d divides n exactly, the quotient is the other half of the pair, and the page produces it in the same step. This is why 60's pairs come out as 1 * 60, 2 * 30, 3 * 20 and so on in order, with no sorting: the smaller halves are found in ascending order, so the pairs are too
1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30, 60
Every factor of 60 as one flat list, ascending. Twelve entries, which is an even count — the pairing is complete, every factor has a partner. The list is the same information as the pairs below it, rearranged: read the pairs and collect the numbers, and you have this line back
6 * 6
The middle pair of 36, and the only shape in which a factor appears twice on one line. 36 is a perfect square, so its factor count is odd — 1, 2, 3, 4, 6, 9, 12, 18, 36, which is nine — and the page prints the middle pair once rather than twice. This is why a perfect square never has a factor count that is even

Simplifying a fraction is the most common reason to want a factor list. To reduce 42/60 by hand you look for a number dividing both, and the factors of 60 tell you the candidates while the factors of 42 tell you which ones qualify — the largest such number is the greatest common factor, and gcf-calculator answers that question directly if that is all you need. A second use is a rectangle with a fixed area: a garden bed of 60 square metres can be 1 by 60, 2 by 30, 3 by 20, 4 by 15, 5 by 12 or 6 by 10, and the factor pairs are exactly that list of possible shapes, which is why they are printed in the shape they are. The same question appears whenever items have to be arranged in equal rows and columns: seating 60 guests at tables of equal size, or splitting a class into groups of the same size with nobody left over. A third use is checking a claim. If someone says 91 is prime, its factor list settles it — 1, 7, 13, 91 — and the fact that there are four entries rather than two is the refutation. Divisibility rules for 2, 3, 5 and 9 cover the small cases by hand, and this page picks up from where those stop being easy. When the question is really about the pieces rather than the factors, the answer lives elsewhere: prime-factors-calculator breaks the number into primes, which this page deliberately does not do; lcm-calculator and gcf-calculator compare two numbers rather than describing one; and simplify-fractions-calculator uses a common factor to reduce a fraction directly, without showing you the list.

Worked examples

  1. Twelve factors: 60

    1. Test 1: 60 ÷ 1 = 60 exactly, so 1 and 60 are both factors
    2. Test 2: 60 ÷ 2 = 30, so 2 and 30 are factors; test 3: 60 ÷ 3 = 20, giving 3 and 20
    3. Test 4: 60 ÷ 4 = 15, giving 4 and 15; test 5: 60 ÷ 5 = 12, giving 5 and 12
    4. Test 6: 60 ÷ 6 = 10, giving 6 and 10; test 7: 60 ÷ 7 is not a whole number
    5. 8 × 8 = 64 is past 60, so stop — the twelve factors are complete

    The default input, and a good one because 60 has many factors — twelve, the most of any number below it. Note how cheap the search was: seven trial divisors, not sixty. The pairs line and the factor list are the same twelve numbers; the pairs are simply folded so that each one sits next to the number it multiplies with. Also worth noticing that the pair list ends at 6 * 10 rather than continuing into 10 * 6: once the smaller half of a pair passes the square root, every remaining pair is a repeat of one already printed.

  2. A perfect square: 36

    1. 1 and 36 pair, then 2 and 18, then 3 and 12, then 4 and 9
    2. 6 × 6 = 36, so 6 is its own partner — the middle of the list
    3. 7 does not divide 36; 7 × 7 = 49 is already past it, but 6 was the last divisor under the square root
    4. The factors are 1, 2, 3, 4, 6, 9, 12, 18, 36 — nine of them, an odd count

    The case that shows why a factor count can be odd. Every factor except the square root has a distinct partner, so they pair off and contribute an even number; the square root pairs with itself and contributes one. That is the whole reason 36 has nine factors while 60, a larger number, has twelve, and 12 has six. The pairs line prints 6 * 6 once rather than twice, which is a choice — printing it twice would make the two lines disagree about how many factors there are.

  3. A prime number: 7

    1. Test 1: 7 ÷ 1 = 7 exactly, so 1 and 7 are factors
    2. Test 2: 7 ÷ 2 is not a whole number; 3 × 3 = 9 is past 7, so the search stops there
    3. Nothing between 1 and 7 divides it
    4. Two factors and one pair — which is the definition of a prime number

    The shortest non-trivial output on the page, and the one that shows a prime is not a failure to factor. A prime is a number with exactly two factors, and those two are always 1 and the number itself; the page reports that fact rather than reporting that it could not find anything. The stopping rule does real work here — after testing 2 there is nothing left to test, because 3 × 3 is already greater than 7. Testing 3, 4, 5 and 6 would cost four divisions and could not possibly find anything.

Limitations

The input must be a whole number from 1 to 1000000. Zero is refused: every whole number divides zero, so its factor list would be infinite and there is nothing sensible to print. Negative numbers are refused too, even though ±1, ±2 and so on all divide −60 — the page reports the positive factors of a positive number, and a signed factor list would need a convention about whether both signs are shown that this page does not state. Decimals are refused rather than rounded. The ceiling of one million is what keeps the trial division bounded: the search stops at the square root, so the worst case is a thousand trials, and the answer list can be long but never unmanageable. It can still be long — 720720 has 240 factors, the most of any number below one million — and a list that size is correct but not much fun to read. The page reports factors and factor pairs, not prime factors, and the difference is easy to miss: 60's factor list contains 2, 3 and 5, but the page never says 60 = 2² × 3 × 5, and for a large number the two questions have very different costs. Divisibility rules for 2, 3, 5 and 9 are not called out separately — they are simply absorbed into the trial division, so a number ending in 0 shows 2, 5 and 10 as factors without the page mentioning why. Every factor is printed as a whole number in a comma-separated list, and the pairs use an asterisk for multiplication; no thousands separators are used, so a factor of one million prints as 1000000. Finally, the reference table below shows three fixed numbers rather than following your input; the panel above is the one that answers what you typed.

Frequently asked questions

What exactly counts as a factor?
Any whole number that divides your number exactly, leaving no remainder. Both members of each pair count, so for 60 the list runs from 1 all the way up to 60 — 1 and the number itself are always factors, and the interesting ones are in between. Fractions do not count even when they divide evenly: 2.5 goes into 60 twenty-four times, but 2.5 is not a whole number, so it is not a factor. This page lists the positive factors of a positive number, which is the standard convention.
Why does the search stop at the square root?
Because past it, every factor you would find is the partner of one you have already seen. If d × e = 60 and d is larger than the square root of 60, then e is smaller than it — so e was tested earlier and the pair was printed then. Testing beyond that point can only rediscover pairs in the other order. This is why 60 takes seven trial divisors rather than sixty, and why the cost of this page grows with the square root of the input: a number near a million takes about a thousand tests, not a million.
Why does 36 have an odd number of factors?
Because 36 is a perfect square, so its square root pairs with itself. Every other factor has a different partner — 1 with 36, 2 with 18, 3 with 12, 4 with 9 — and each such pair adds two to the count. Then 6 × 6 = 36 adds one. So the total is 4 × 2 + 1 = 9. In general a number has an odd number of factors exactly when it is a perfect square, and that is the quickest way to tell from a factor list whether the number is one.
Is this the same as prime factorization?
No, and it is worth being clear about the difference. This page gives every factor; prime factorization breaks the number into primes multiplied together. For 60 the prime factorization is 2² × 3 × 5, and the page never prints that — though 2, 3 and 5 all appear in the factor list, because primes are factors like any others. The practical difference is cost: this page does work proportional to the square root of the number, while prime factorization is genuinely hard for large numbers, which is the assumption public-key cryptography rests on.
Can I enter 0 or a negative number?
No, and neither is an arbitrary restriction. Every whole number divides 0, so its factor list would never end. For a negative number the factors come in both signs — 1 and −1, 2 and −2, and so on — and this page would have to take a position on whether to list both, which it does not. The input is a whole number from 1 to 1000000. Decimals are refused as well rather than rounded, because rounding would silently answer a question about a different number.
Why are the factors split into two columns?
Because they answer two different questions. The flat list is what you check when you want to know whether some number divides yours. The pairs are what you want when the number is a product of two things you are choosing — a rectangle with that area, a set of equal rows and columns, a group split with nobody left over. A 60-square-metre bed can be 1 by 60, 2 by 30, 3 by 20, 4 by 15, 5 by 12 or 6 by 10, and those six shapes are exactly the pairs column. The two columns hold the same numbers; only the arrangement differs.

References

Related calculators