Skip to main content
L
Loopaloo
Buy Us a Coffee
All ToolsImage ProcessingAudio ProcessingVideo ProcessingDocument & TextPDF ToolsCSV & Data AnalysisConverters & EncodersWeb ToolsMath & ScienceGames
Guides & BlogAboutContact
Buy Us a Coffee
L
Loopaloo

Free online tools for developers, designers, and content creators. Your files are processed in your browser and are never uploaded - no accounts required. A few network utilities (like What's My IP and Currency Converter) call public APIs to do their job and say so on their pages.

support@loopaloo.com

Tool Categories

  • Image Tools
  • Audio Tools
  • Video Tools
  • Document & Text
  • PDF Tools
  • CSV & Data
  • Converters
  • Web Tools
  • Math & Science
  • Games

Company

  • About Us
  • Contact
  • Blog
  • FAQ

Legal

  • Privacy Policy
  • Terms of Service
  • Disclaimer

Support

Buy Us a Coffee

© 2026 Loopaloo. All rights reserved. Built with privacy in mind.

Privacy|Terms|Disclaimer
  1. Home
  2. Math & Science
  3. Prime Number Checker
Add to favorites

Prime Number Checker

Check whether any whole number is prime, and see its prime factors, divisors, nearby primes and Goldbach pairs, or list every prime in a range.

Calculated locally in your browserMore math & scienceJump to full guide

Initializing in your browser…

You might also like

GCD & LCM Calculator

Find the GCD and LCM of two or more whole numbers of any size, with the Euclidean algorithm, prime factorisations, Bezout coefficients and common divisors shown.

Scientific Calculator

A scientific calculator with exact fractions and decimals, degrees or radians, 34 functions and a desk-calculator mode. Rounded answers are labelled as rounded.

Graphing Calculator

Plot up to eight functions of x, find their roots, turning points and intersections, shade integrals and draw derivatives. Pan, zoom and share any graph.

A worked calculation

A programming puzzle asks for the largest prime factor of 600851475143, and you want to check your answer.

Number

600851475143
What Prime Number Checker produces

Result

NOT PRIME
600,851,475,143 = 71 × 839 × 1471 × 6857
Divisors: 16
Nearby primes: 600,851,475,067 below, 600,851,475,149 above

The number is composite and splits into four different primes, so the largest prime factor is 6857. Because each prime appears once, the number has 2 × 2 × 2 × 2 = 16 divisors. Multiplying the factors back together gives 600851475143 again, which is a quick way to check any factorisation.

Is it prime? Any size, instantly

Type any whole number to find out at once whether it is prime, then see its prime factorisation, its divisors, the nearest primes on either side and, for even numbers, ways to write it as a sum of two primes. A second panel lists every prime in a range.

How it works

A fast, reliable verdict. The tool uses the Miller-Rabin test with the first twelve primes as witnesses. For every number below 3,317,044,064,679,887,385,961,981, which covers all numbers of up to 24 digits, that combination is a proven test, so the answer is certain. Numbers are handled at any length, so 2^127 - 1, a 39-digit prime, is confirmed instantly; above the proven range the page notes that the verdict is a very strong probability rather than a proof. Zero and one are explained rather than forced into a category: neither is prime, and one is excluded so that every number has exactly one factorisation into primes. Decimals such as 17.9 are refused, since only whole numbers can be prime.

Factorisation and divisors. Every composite number is broken into its prime factors, written with powers, so 360 is 2^3 × 3^2 × 5. Small factors are found by trial division and large ones by Pollard's rho method, which works in the background so the page never freezes; a number with no small factors and dozens of digits can take a while, and a Stop button ends the search. From the factorisation come the number of divisors, their sum, the sum of the proper divisors (which tells you whether a number is perfect, abundant or deficient) and Euler's totient. For numbers up to a quadrillion the divisors themselves are listed too, as long as there are no more than 4,000 of them.

The primes around it. The panel beside the factorisation shows the previous and next prime and the gaps to them, and flags twin primes (two apart, like 17 and 19), Sophie Germain primes (where 2n + 1 is also prime), safe primes and Mersenne primes, which are one less than a power of two. For an even number above 2, the tool lists the first few ways to write it as a sum of two primes, the pairs that Goldbach's conjecture says always exist.

Primes in a range. Enter a start and an end up to 200,000 numbers apart and the tool counts the primes in between with a sieve and lists up to 2,000 of them. The range can start anywhere, so the primes between 1,000,000,000 and 1,000,000,100 come back as quickly as those below 100. Thousands separators, written with commas or spaces, are accepted in every box. Everything is computed in your browser.

Examples

  • The largest 32-bit integer

    2147483647 is prime: it is the Mersenne prime 2^31 - 1. The primes either side are 2147483629 and 2147483659.

  • A Carmichael number

    561 = 3 × 11 × 17 passes the simple Fermat test for every base that shares no factor with it, but it is composite and is correctly reported as not prime.

  • A factorisation puzzle

    600851475143 = 71 × 839 × 1471 × 6857, so its largest prime factor is 6857. It has 16 divisors.

How to use

  1. 1Type a whole number into the box, or tap an example such as 561 or 2^127 - 1.
  2. 2Read the verdict: prime, not prime, or neither for 0 and 1.
  3. 3For a composite number, read the prime factorisation and the divisor facts below it.
  4. 4Check the nearby primes panel for the gaps and any special names the number has.
  5. 5To list primes, set the From and To boxes in the range panel.
  6. 6Copy the factorisation, or press Share for a link to the same number.

Key features

  • Primality of whole numbers of any length, proven below 3.3 × 10^24
  • Prime factorisation with exponents, using trial division and Pollard's rho
  • Factorisation in the background, with a Stop button for very hard numbers
  • Number of divisors, their sum, the sum of proper divisors and Euler's totient
  • Perfect, abundant and deficient numbers identified
  • The divisors themselves listed for numbers up to a quadrillion
  • Previous and next primes with the gaps to them
  • Twin, Sophie Germain, safe and Mersenne primes recognised
  • Goldbach pairs for even numbers
  • All primes in a range of up to 200,000 numbers, starting anywhere

Tips & best practices

  • Paste long numbers straight in; commas or spaces between groups of three digits are ignored.
  • If a factorisation is taking a long time, the number has two or more very large prime factors. Press Stop and the verdict still stands.
  • Use the range panel with a narrow window high up, such as 10,000,000,000 to 10,000,001,000, to see how sparse primes become.
  • For a Mersenne candidate, compute 2^p - 1 in the scientific calculator and paste the digits here.

When this is useful

  • Homework and number theory

    Check whether a number is prime, find its factors and divisors, and see how many divisors it has.

  • Programming and puzzles

    Verify answers to factorisation puzzles such as the largest prime factor of 600851475143.

  • Cryptography lessons

    Explore safe primes, Mersenne primes and why large primes are easy to test but large composites are hard to factor.

  • Teaching

    Show why 561 fools simple tests, why 1 is not prime, and how primes thin out as numbers grow.

Frequently asked questions

How does it decide whether a number is prime?

With the Miller-Rabin test, using the first twelve primes as witnesses. Below 3,317,044,064,679,887,385,961,981 this combination has been proven never to make a mistake, so the answer is certain. Above that the answer is a very strong probability, and the page says so.

Why are 0 and 1 not prime?

A prime has exactly two divisors, 1 and itself. One has only one divisor, and zero is divisible by every number. Leaving 1 out also keeps the rule that every whole number above 1 has exactly one factorisation into primes.

Why does factorising some numbers take a long time?

Testing whether a number is prime is fast, but finding the factors of a large number made of two big primes is hard; that difficulty is what RSA encryption relies on. The search runs in the background and you can stop it at any point.

What is a Carmichael number?

A composite number, such as 561, 1105 or 1729, that passes the Fermat primality test for every base sharing no factor with it. The Miller-Rabin test used here is not fooled by them.

What does Euler's totient mean?

It counts the numbers from 1 to n that share no factor with n. For a prime p it is p - 1. It is worked out from the prime factorisation and is central to how RSA keys are made.

How large a range can I list?

Up to 200,000 consecutive numbers, anywhere on the number line. The count covers the whole range and the first 2,000 primes are listed.

Is my number sent anywhere?

No. All of the testing and factorising runs in your browser.

Related tools and how they differ

  • GCD & LCM Calculator: Use it to find the greatest common divisor and lowest common multiple of several numbers, with the working.
  • Fraction Calculator: Use it to simplify a fraction, which divides out the prime factors the two parts share.
  • Scientific Calculator: Use it to compute a large number first, such as 2^89 - 1, before checking whether it is prime.

Private by design

Every calculation runs locally in your browser. Your numbers and expressions are not transmitted or stored.