Skip to content
Home → All Tools → Math Tools → Prime Number Checker
MATH TOOLS

Prime Number Checker

Check whether a positive whole number is prime and see the basic divisibility result.

Use the tool

Enter your values below. Results are calculated in your browser.

About this Prime Number Checker

Prime Number Checker quickly tests whether a positive whole number is prime. It also reports a factor when the number is composite, which can help you understand why the number is not prime.

Formula or method

A prime number is a whole number greater than 1 with exactly two positive divisors: 1 and itself. Testing factors only up to √n is sufficient.

Example

29 is prime because no whole number from 2 through √29 divides it exactly. 30 is not prime because it is divisible by 2, 3, 5 and more.

Common uses

  • Check number-theory exercises and arithmetic homework.
  • Verify whether a value can be factored beyond 1 and itself.
  • Explore prime and composite numbers without manual trial division.

How to use this tool

  1. Enter the values or text requested by the calculator.
  2. Choose units or options when the tool provides them.
  3. Select the calculation button and review the result.
  4. Use the formula, example and notes on this page to check whether the result fits your situation.

Important note

This checker is intended for positive whole numbers within the browser safe-integer range. Very large integers may take longer to test.

Frequently asked questions

Is 1 a prime number?

No. A prime number must have exactly two positive divisors, and 1 has only one.

Are negative numbers prime?

In elementary number theory, prime numbers are defined as positive integers greater than 1.