TalentJR
Search

Prime Number Checker and Prime Factorization Calculator

Type any whole number up to 10¹⁵ to find out whether it is prime or composite. You also get its prime factorization by repeated division (1260 = 2² × 3² × 5 × 7), the number of factors, the full list of factors, and the nearest primes before and after it. Switch to “Primes in a range” to list every prime between two numbers.

Up to 10¹⁵. Commas are fine: 1,00,003

1,260
❌ Composite number
Prime factorization
2² × 3² × 5 × 7
Smallest prime factor
2
Number of factors
36
Nearest primes
1,259 · 1,277

All factors: 1, 2, 3, 4, 5, 6, 7, 9, 10, 12, 14, 15, 18, 20, 21, 28, 30, 35, 36, 42, 45, 60, 63, 70, 84, 90, 105, 126, 140, 180, 210, 252, 315, 420, 630, 1,260

Step-by-step solution
  1. 1,260 ÷ 2 = 630, so 2 is a factor — 1,260 is composite. (It is even.)
  2. Prime factorisation by repeated division (divide by the smallest prime that goes in):
  3. 1,260 ÷ 2 = 630
  4. 630 ÷ 2 = 315
  5. 315 ÷ 3 = 105
  6. 105 ÷ 3 = 35
  7. 35 ÷ 5 = 7
  8. 7 ÷ 7 = 1
  9. 1,260 = 2 × 2 × 3 × 3 × 5 × 7 = 2² × 3² × 5 × 7
  10. Number of factors = (2 + 1) × (2 + 1) × (1 + 1) × (1 + 1) = 36
  11. Nearest primes: 1,259 (before) and 1,277 (after).

Prime numbers from 1 to 100

2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97

How to use the prime number checker

  1. Choose “Is it prime?” or “Primes in a range”.
  2. Type a whole number (commas are fine: 1,00,003) — or the start and end of the range (up to 10,000 numbers apart).
  3. Read the answer: prime, composite or neither, with the smallest factor and the prime factorization.
  4. Open the steps for the division ladder, the factor count and the nearest primes.

Formulas

Prime numberexactly two factors: 1 and itself
2 is the only even prime. 1 is neither prime nor composite.
Primality testn is prime ⇔ no prime p ≤ √n divides n
Prime factorizationn = p₁ᵃ × p₂ᵇ × p₃ᶜ × …
Unique for every number (Fundamental Theorem of Arithmetic, Class 10).
Number of factors(a + 1)(b + 1)(c + 1)…

Solved examples

Example 1: Is 91 a prime number?

  • √91 ≈ 9.5, so test 2, 3, 5, 7
  • 91 ÷ 7 = 13

Answer: No — 91 = 7 × 13 is composite

Example 2: Find the prime factorization of 1260.

  • 1260 ÷ 2 = 630, 630 ÷ 2 = 315
  • 315 ÷ 3 = 105, 105 ÷ 3 = 35
  • 35 ÷ 5 = 7, 7 ÷ 7 = 1

Answer: 1260 = 2² × 3² × 5 × 7

Example 3: How many factors does 72 have?

  • 72 = 2³ × 3²
  • (3 + 1)(2 + 1) = 12

Answer: 12 factors: 1, 2, 3, 4, 6, 8, 9, 12, 18, 24, 36, 72

How to check if a number is prime

You only need to try dividing by primes up to the square root of the number. If none of them divides it, it is prime: to check 97, try 2, 3, 5 and 7 (because 10² = 100 > 97) — none works, so 97 is prime. Divisibility rules make this fast: even numbers are divisible by 2, a digit sum divisible by 3 means divisible by 3, and a last digit 0 or 5 means divisible by 5.

For very large numbers this calculator uses the Miller–Rabin test with fixed bases, which is proven to be exact for every number below 3.3 × 10²⁴ — so the answer is certain, not a guess.

Prime factorization and why it matters

Every whole number greater than 1 can be written as a product of primes in exactly one way (ignoring order). That is how you find the HCF and LCM, simplify square roots (√72 = 6√2) and decide whether a fraction has a terminating decimal — only 2s and 5s in the denominator.

🎯 Asked in competitive exams

This topic regularly appears in the quantitative aptitude section of:

  • SSC CGL & CHSL
  • RRB NTPC & Group D
  • Campus placement aptitude tests
Get job-ready with TalentJR Career →

Career guidance: ATS resume check, skill-gap analysis and AI interview practice.

Frequently asked questions

Is 1 a prime number?

No. A prime has exactly two different factors, 1 and itself. 1 has only one factor, so it is neither prime nor composite.

How many prime numbers are there between 1 and 100?

25: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89 and 97. Use “Primes in a range” to list them for any range.

What is the difference between prime factorization and factors?

Factors are all the numbers that divide a number exactly (12: 1, 2, 3, 4, 6, 12). Prime factorization writes the number as a product of primes only (12 = 2² × 3).

What are twin primes?

Pairs of primes that differ by 2, such as (3, 5), (11, 13) and (17, 19). The range mode lists the twin primes it finds.

How large a number can I check?

Up to 10¹⁵ (1,000,000,000,000,000). The prime test is instant; factorising a number with two large prime factors can take a moment.

Keep learning

Related calculators

Learn this on TalentJR

More on TalentJR

Last updated .