Maths & numbers

Primes in an interval calculator

List primes in an inclusive interval and count them.

Your numbers

Calculated on your device. Your inputs aren’t sent to us.

Your result

Ready when you are

Enter your inputs and select Calculate.

Report an issue

Behind the numbers

How this calculation works

The endpoints count when prime. For an interval starting at 0 or 1, the first possible listed value is 2.

THE FORMULACount integers with no divisors from 2 through their square root

A worked example

There are six primes between 10 and 30, from 11 through 29.

Good to know

Both endpoints are included.

Read the result

List primes in an inclusive interval and count them.

The primary result is labeled “Prime count”. Keep the input definitions in view when comparing this result with another method.

Try a related calculation

Both endpoints are included.

For a related exercise, try the greatest common divisor.

A few questions, answered

How can I check the default inputs by hand?

There are six primes between 10 and 30, from 11 through 29.

Which rule does this calculator apply?

Count integers with no divisors from 2 through their square root

Find your calculator

Start typing to explore the library.