Skip to content

Calculate

Prime Checker

Prime Checker

Check whether a number is prime, and see the prime factorisation when it is not. no signup required, no upload required.

Use via API
  • Free, no sign-up
  • REST + MCP
  • Updated
  • Reviewed by Olgun Ozoktas

Any whole number from 2 upwards

This number is composite

It can be written as a product of smaller primes.

Prime factorisation

360 = 2³ × 3² × 5

6 prime factors in total

Why use this prime checker?

A prime number has exactly two divisors: one and itself. Everything else is composite, and every composite number breaks down into primes in exactly one way. This tool answers both questions at once: whether your number is prime, and if not, which primes multiply to make it. It runs entirely in your browser.

Frequently Asked Questions

What makes a number prime?

It has exactly two whole-number divisors, one and itself. 7 is prime because nothing between 2 and 6 divides it. 1 is not prime, because it has only one divisor, and that is why the tool starts at 2.

What is prime factorisation?

Writing a number as a product of primes. 360 is 2 x 2 x 2 x 3 x 3 x 5, shown here as 2 cubed times 3 squared times 5. The fundamental theorem of arithmetic says every whole number above 1 has exactly one such factorisation.

How large a number can it handle?

Up to 2^53-1, the largest integer JavaScript represents exactly. It stays fast to around 10^12; much beyond that, trial division starts to take noticeable time.

How does it find the factors?

Trial division: it divides by 2, then 3, then each larger candidate, stopping at the square root of what remains. Anything left over at the end is itself prime.

Is there an API for this?

Yes. The same check is available over REST and MCP as the tool id prime_check, taking a single integer n.

Do I need an account?

No. This tool requires no signup, no usage limits, and no watermarks.

Rate This Tool

0/1000

Get Weekly Tools

Suggest a Tool