Maths & numbers

Prime number checker

Check whether a whole number is prime.

Prime number checker
Esc to restore

Your inputs

Results update as you type. Larger files run when you press Update result.

Your result

Your result will appear here.

More actions

Your inputs stay in this browser. Nothing is uploaded, and nothing is saved unless you choose “Save result”.

A clear answer. Here’s how.

Checks divisibility up to the square root, testing 2, 3 and candidates of the form 6k±1. Zero and one are neither prime nor composite. Supports whole numbers up to one trillion.

See a worked example

Worked example

A fixed demonstration, separate from the values you enter above.

Whole number to check
97

Example result

97 is prime.