Divisor - Factors, Common Divisors, and GCD
Use this divisor calculator to list every positive divisor of any integer up to 15 digits, see the divisor count and sum, and add a second number for common divisors and the GCD.
Divisor
Results
Factor Pairs
What Is This Calculator?
A divisor is a whole number that divides another whole number with no remainder, and this tool lists every positive factor of any integer you type in. Enter a single number to get the full sorted list, the count, and the sum, and add a second number for shared factors and the GCD.
- • Homework and self-check: Type a number to see every positive factor at once, which is faster than running the divisibility rule by hand.
- • Shared-factor and GCD work: Add a second positive integer to get the shared factor list and the GCD without retyping the factor list for each number.
- • Factor pairs and prime checks: Use the factor-pair table to see both halves of every pair, and confirm a prime by reading a count of 2.
- • Practical splitting and grouping: Read the factor list to see whether a total splits evenly into the group size you have in mind, and which group sizes give an exact split.
The word 'divisor' is interchangeable with 'factor' in number theory. The integer you are factorizing is sometimes called the dividend, and the result of dividing by a factor is the quotient.
If you only need to know whether one number is divisible by another, our divisibility test calculator applies the n mod d = 0 check directly and lists the matching one-line rule.
How the Tool Works
The calculator uses a square-root limit: it tests every integer d from 1 up to floor(sqrt(n)) and, whenever d divides n, records d and the partner n / d as a factor pair. This cuts the work in half and still returns the full list once sorted.
- n: The first positive integer whose factors are being listed. Defaults to 60, which has twelve positive factors and shows the full result panel on the first try.
- m: The optional second positive integer. Leave at 0 to list factors of n only; enter any positive integer to enable shared factors and the GCD.
- d: A candidate factor. The loop tests d = 1, 2, 3, ... up to floor(sqrt(n)) and pairs each successful d with n / d.
- GCD: Greatest common factor of n and m. Reported only when m is greater than 0 and computed as the largest shared factor of the two numbers.
The same square-root loop runs on both numbers when a second integer is supplied. The GCD is the largest element of the intersection, which the calculator reports alongside the count and the full list. As Wolfram MathWorld states, a factor of an integer n is any integer d for which n = d * k, and the calculator uses that exact definition to label every entry.
60 with no second number (default example)
n = 60, m = 0
1. floor(sqrt(60)) = 7. The loop tests d = 1, 2, 3, 4, 5, 6, 7. 2. d = 1, 2, 3, 4, 5, 6 all divide 60 and record (1, 60), (2, 30), (3, 20), (4, 15), (5, 12), (6, 10). 3. d = 7 is skipped. 4. Sort the list: 1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30, 60.
Factor count: 12. Sum: 168. List: 1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30, 60.
Sixty has twelve positive factors because every pairing from 1 up to 6 finds a partner up to 60.
36 with 24 as the second number (shared factors and GCD)
n = 36, m = 24
1. Factors of 36 are 1, 2, 3, 4, 6, 9, 12, 18, 36 (count 9). 2. Factors of 24 are 1, 2, 3, 4, 6, 8, 12, 24 (count 8). 3. Shared entries: 1, 2, 3, 4, 6, 12. 4. Largest shared entry is 12, so the GCD is 12.
Shared factors: 1, 2, 3, 4, 6, 12. Count: 6. GCD: 12.
12 is the largest integer that divides both 36 and 24, which matches 36 / 12 = 3 and 24 / 12 = 2.
According to Wolfram MathWorld, a divisor of an integer n is any integer d for which n = d * k for some integer k, and the calculator uses that exact definition when deciding which numbers to include in the list.
When the calculator reports that n mod d equals 0 for a specific d, you can drop the same pair into our modulo calculator to read the remainder for any positive divisor without re-typing the number.
Key Concepts Explained
Four small ideas cover everything the calculator can show.
Factor vs. multiple
A factor of n is any positive integer d such that n mod d = 0. The term 'divisor' is used for the same number in number theory, so the list returned here and the factor list are the same set of integers.
Factor pairs and the square-root limit
Factors come in pairs (d, n / d). The product of every pair is n, and one half of the pair is always at most sqrt(n), so the calculator tests d up to floor(sqrt(n)) and still gets the full list.
Perfect squares
When n is a perfect square, the entry d = sqrt(n) pairs with itself. The loop records it once instead of twice so the list never has duplicates.
Shared factors and the GCD
A common factor of n and m is a positive integer that divides both with no remainder. The greatest of those, the GCD, is the largest step that fits both numbers and is the building block for the LCM.
These four ideas cover every output the calculator shows. The square-root limit tests only half of the search space, which is why the page is faster than dividing by every integer up to n.
When the factor list is long and you want the exponent form behind it, the prime factorization calculator returns the prime factors of the same number in a single step.
How to Use This Calculator
Five short steps cover the single-number and the two-number workflows.
- 1 Enter the first number: Type any positive integer in the 'Number' field. The default 60 has twelve positive factors, so the result panel is populated on the first try.
- 2 Add a second number (optional): Type a second positive integer in the 'Second Number (optional)' field to enable the shared list and the GCD. Leave the field at 0 to skip that block.
- 3 Read the list and count: The result panel shows the sorted list, the count, and the sum. The list is in ascending order, with the smallest entry (1) on the left and the largest (n) on the right.
- 4 Read the shared factors and GCD: When the second number is greater than 0, the panel also shows the shared list, the shared count, and the GCD. The GCD is the largest step that fits both numbers.
- 5 Scan the factor-pair table: The factor-pair table below the result panel shows both halves of every pair, so you can see how each entry d maps to n / d. For a prime number, the table reduces to the single pair (1, n).
Enter 36 in the first number field and 24 in the second. The result panel reads 'Factor count: 9, sum: 91, list: 1, 2, 3, 4, 6, 9, 12, 18, 36' and the shared-factor block reads 'Shared factors: 1, 2, 3, 4, 6, 12, count: 6, GCD: 12'. Change the second number to 0 to see only the factors of 36.
If you have two numbers and want the largest shared factor only, the greatest common factor calculator returns the GCD in a single field and is the natural follow-up once the shared-factor block is visible here.
Benefits of Using This Calculator
A purpose-built tool is faster and more reliable than running the divisibility rule for each small integer by hand.
- • Full sorted list in one step: The calculator returns the complete ascending list of positive factors, the count, and the sum in a single click, which saves running the divisibility rule by hand.
- • Shared factors and GCD without retyping: Adding a second number switches on the shared list and the GCD, so you do not need to write down the factor list for each number before intersecting them.
- • Factor-pair table makes the structure visible: The factor-pair table shows both halves of every pair, which makes it easy to see that a prime reduces to (1, n) and that a perfect square has one pair where d = n / d.
- • Works on large inputs: The square-root limit keeps the loop fast up to 15 digits, and the inputs are clamped to the JavaScript safe-integer range so the result is always exact for everyday classroom and textbook numbers.
When the factor count is long, the prime factorization calculator returns the exponent form in a single step, which is the same logic that powers the textbook rule 'add 1 to each exponent and multiply'.
When you want the same list with the count of factors and a quick prime-factorization hint, the factor calculator presents the same data in a more classroom-ready layout.
Factors That Affect Your Results
The factor cards below describe the structural properties of the number you typed, in the same order the live factor-pair table renders them.
Whether n is prime
A prime has exactly two positive factors (1 and itself), so the count is 2 and the sum is n + 1.
Whether n is a perfect square
A perfect square has an odd number of positive factors because d = sqrt(n) pairs with itself.
How many prime factors n has
The factor count is the product of (exponent + 1) over each prime factor, so another prime multiplies the count by a fresh (exponent + 1) term.
How large n is
The square-root limit only tests d up to floor(sqrt(n)), so a 15-digit input still finishes in milliseconds because the loop scales with sqrt(n).
Whether a second number is provided
When the second number is greater than 0, the shared block and the GCD become visible. Leave the field at 0 to hide that block.
- • The calculator accepts positive integers up to 15 digits (capped at Number.MAX_SAFE_INTEGER). Inputs above that cap are clamped to keep the result exact.
- • Negative integers and zero are not supported. The form rejects n less than 1.
When the factor list is long, the prime factorization calculator gives the exponent form in one step. As Wolfram MathWorld states, the greatest common factor of two positive integers is the largest integer that divides both, which the calculator reports as the GCD.
According to Wolfram MathWorld, the greatest common factor of two positive integers is the largest integer that divides both, and the calculator reports that exact value as the GCD when a second number is supplied.
When the factor count on the result panel is exactly 2, the prime number checker confirms the primality reading and lists the nearest prime neighbors for context.
Frequently Asked Questions
Q: What is a divisor in math?
A: A divisor of an integer n is any positive integer d that divides n with no remainder. For 60, the list runs 1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30, and 60. The word 'factor' is used for the same set in elementary math.
Q: How do I find all the factors of a number?
A: Test every integer d from 1 up to the square root of the number. Whenever n mod d equals 0, both d and the partner n / d are factors. Sort the full list ascending for the complete answer.
Q: What are the factors of 36?
A: The positive factors of 36 are 1, 2, 3, 4, 6, 9, 12, 18, and 36. The list has 9 entries, the sum is 91, and the largest proper factor is 18.
Q: What is the greatest common divisor (GCD)?
A: The GCD of two positive integers is the largest integer that divides both with no remainder. For 36 and 24, the shared factors are 1, 2, 3, 4, 6, and 12, so the GCD is 12.
Q: How do I find common factors of two numbers?
A: Enter the first number in the 'Number' field and the second positive integer in the 'Second Number (optional)' field. The panel lists shared entries, shows the count, and reports the GCD. Leave the second field at 0 to disable the block.
Q: What is the difference between a divisor and a factor?
A: In elementary number theory the two words refer to the same set of integers. A factor of n is any positive integer d that divides n with no remainder, and a divisor of n is the same integer used when building n as a product.