How it works
Every whole number from 1 up to the number itself is tested; whichever divide in evenly, with no remainder, are its factors.
Factors arrive in pairs, which is why the search can stop half way. When a divides 48 exactly, the quotient is its partner, so 1 pairs with 48, 2 with 24, 3 with 16, 4 with 12 and 6 with 8. The square root of 48 is about 6.93, so only the candidates up to that point are tested: 5 is skipped because 48 divided by 5 leaves a remainder. Sorting both halves of each pair gives 1, 2, 3, 4, 6, 8, 12, 16, 24 and 48, ten factors in total.
The same list answers neighbouring questions. A number with exactly two factors is prime, which the Prime Number Checker tests directly. The greatest factor two numbers share is their greatest common divisor, and the smallest number both divide into is their least common multiple, as the GCD & LCM Calculator shows.
Formula: A factor is a whole number that divides evenly into another, with no remainder.
Examples
A composite number
24 has eight factors: 1, 2, 3, 4, 6, 8, 12 and 24.
A prime number
17 has exactly two factors: 1 and 17 — the definition of a prime number.
A perfect square
36 has nine factors: 1, 2, 3, 4, 6, 9, 12, 18 and 36. The count is odd because the square root is the one factor that pairs with itself, 6 × 6 = 36.
A number with many factors
2310 = 2 × 3 × 5 × 7 × 11 has 32 factors: 1, 2, 3, 5, 6, 7, 10, 11, 14, 15, 21, 22, 30, 33, 35, 42, 55, 66, 70, 77, 105, 110, 154, 165, 210, 231, 330, 385, 462, 770, 1155 and 2310. Checking every candidate would mean testing 2,310 numbers; testing only up to the square root, which is a little over 48, finds them all.
Common uses
- Dividing a quantity into equal groups where the group size must be a whole number, such as sharing 60 equally between 12 people to get 5 each.
- Checking whether a whole number is prime before using it in an exercise or a proof.
- Reducing a fraction to lowest terms by taking the greatest factor the top and bottom share: 12/18 has 6 in common, so it becomes 2/3.
- Listing the whole-number rectangles of a given area, where each pair of factors describes one: 24 gives 1 × 24, 2 × 12, 3 × 8 and 4 × 6.
Things to keep in mind
- The number must be a positive whole number. 1 always has exactly one factor: itself.
- Decimals, negative numbers and zero are rejected, because the tool factorises positive whole numbers only.
- The largest number that can be factored is 1,000,000,000,000. Above that, testing every candidate up to the square root would be too slow to run in a browser.
- A perfect square has an odd number of factors, since its square root is the only factor that pairs with itself.
- Every factor returned is a whole number, so no rounding is applied and nothing is shown to a fixed number of decimal places.