Enter any whole number to list its factors, factor pairs, prime factorization, and a quick classification like prime, composite, odd, or even.
Advanced options
How to use our Factor Calculator
- Type a whole number into Number to factor. You can enter values like 36, -45, 97, 1, or 0.
- Choose an option in Show factors to see either standard positive factors only or both positive and negative factors.
- If you want a different number style in long lists, choose your preferred Thousands separator option.
- Click Calculate to generate the results.
- Read Number interpreted first to confirm the calculator used the exact integer you meant after removing spaces or commas.
- Use Classification to understand the type of number, such as prime, composite, zero, one, negative, odd, or even.
- Check Positive factors for the standard school-style list, and read Negative factors only if you selected that mode.
- Use Factor pairs, Number of positive factors, and Total factors shown to verify the list makes sense. For example, a prime number should have exactly 2 positive factors.
Definitions
Factor: A whole number that divides another whole number evenly, with no remainder [1].
Positive factors: The standard school-style list of positive whole-number divisors.
Negative factors: The matching negative divisors of a nonzero integer, such as -1, -2, and -3 for 6 [1].
Factor pair: Two integers whose product equals the target number or its absolute value, depending on the sign explanation shown.
Prime number: A whole number greater than 1 with exactly two positive factors: 1 and itself [2].
Composite number: A whole number greater than 1 that has more than two positive factors.
Prime factorization: Writing a number as a product of prime numbers, often using exponents for repeats [1].
Absolute value: The distance from 0 on the number line, so -45 and 45 have the same absolute value.
Common mistakes and quick fixes
Mistake: Typing a decimal like 12.5 into Number to factor .
Fix: Enter a whole number only. Factors are based on integers such as 12, -12, 1, or 97.
Mistake: Expecting Negative factors to appear while Show factors is still set to positive-only mode.
Fix: Change Show factors to Positive and negative factors if you want the full integer-factor list.
Mistake: Thinking Prime factorization of absolute value should include a negative sign for a negative input.
Fix: Read the label carefully. The prime factorization is built from the absolute value, while the sign is handled separately in Classification and the factor lists.
Mistake: Treating 0 like an ordinary number and expecting a normal Number of positive factors result.
Fix: For 0, the factor list is infinite, so the calculator shows a special case instead of a finite count or list.
Mistake: Assuming Smallest factor greater than 1 should always exist.
Fix: If the number is prime, 1, -1, or 0, that output may be unavailable because there is no valid factor greater than 1 in the usual sense.
Mistake: Reading Total factors shown as the same thing as Number of positive factors in every mode.
Fix: In positive-only mode they match, but when Show factors includes negatives for a nonzero number, the total shown is double the positive count.
Limitations & Key Assumptions / Boundary Conditions
- This calculator accepts whole numbers only. Blank input, decimals, fractions, scientific notation text, NaN, and Infinity should trigger an error.
- For 0, the factor list is infinite because every nonzero integer divides 0 evenly, so no finite factor list or divisor count is shown.
- For 1 and -1, the usual school definition of prime factorization does not apply, so that output is shown as not defined in the usual sense.
- For negative inputs, positive factors are generated from the absolute value, and negative factors are added only when Show factors includes them.
- Perfect squares have a repeated middle factor at the square root, but it should appear only once in the factor-pair logic and positive-factor list.
- Very large absolute values can slow trial division in a browser, so the calculator may block extremely large inputs to keep the page responsive.
- Total factors shown depends on the selected mode. Hidden negative-factor results must not be counted in positive-only mode.
Methodology
How the calculator finds factors
The calculator first cleans the entry by removing spaces and commas, then checks that Number to factor is a valid whole number. It uses the absolute value to build the positive-factor list for negative inputs.
d is a positive factor of n if |n| mod d = 0 and 1 <= d <= |n|
Instead of testing every number all the way up to |n|, it only tests candidate divisors up to the square root. When one divisor works, the matching partner factor is found by division.
test d from 1 to floor(sqrt(|n|)); if |n| mod d = 0, pair is (d, |n|/d)
This works because factors come in pairs around the square root. For a perfect square, the square-root factor is counted once, not twice.
Prime factorization and divisor count
For |n| greater than or equal to 2, the calculator breaks the number into prime factors and combines repeats with exponents [1].
|n| = p1^a1 * p2^a2 * ... * pk^ak
From those exponents, it calculates the number of positive divisors.
tau(|n|) = (a1 + 1)(a2 + 1)...(ak + 1)
If Show factors includes negative factors and the number is not 0, the total displayed factor count is doubled because each positive divisor has a matching negative divisor [1].
total_shown = 2 * tau(|n|) for n != 0
Worked mini-example
Example: if Number to factor is 36, the factor pairs are (1, 36), (2, 18), (3, 12), (4, 9), and (6, 6). So the positive factors are 1, 2, 3, 4, 6, 9, 12, 18, and 36. The prime factorization is 2^2 * 3^2, so the number of positive factors is (2 + 1)(2 + 1) = 9.
Example:
if the input is -45, the calculator uses |n| = 45 to find positive factors 1, 3, 5, 9, 15, and 45. If negative factors are included, it also shows -1, -3, -5, -9, -15, and -45, for a total of 12 shown factors.
Special cases
For 0, the calculator reports a special case because there are infinitely many integer divisors, so a finite factor list and finite divisor count are not possible. For 1 and -1, the positive-factor list is just 1, and prime factorization is not defined in the usual school sense.
Assumptions used
The method assumes standard integer-factor rules, whole-number input only, and browser-friendly trial division up to the square root. Very large values may be rejected for speed, and formatting choices such as Thousands separator change display only, not the math.