Skip to content

Check if a number is prime

Enter an integer and find out whether it is prime, its factors and the next prime.

It works in your browser. We do not store or send anything you type.Free · No sign-up required

Workspace · Prime checker

Runs in your browser · 100% local

Enteros de hasta 18 dígitos.

Es primo

Factors97
Next prime101
Files are processed in your browser; if you are signed in with history enabled, text results appear in your history.
Instructions

How to use it

01

Type a positive integer.

02

Press Check.

03

Review whether it is prime, its factorisation and the next prime.

Examples

Examples

97

97 is prime: it has no divisors between 2 and its square root.

91

91 is not prime: 7 × 13.

Reference guide

What you need to know

Small numbers are tested against divisors up to the square root. Large integers use Miller-Rabin with deterministic bases for 64 bits, reliable for the usual range.

Frequently asked questions

Frequently Asked Questions

Integers up to 15 digits are accepted to keep the calculation instant.

Related tools

Other tools that can help with similar tasks.

More at Mathematics→
Check if a number is prime online · ByTooly