How to use this tool
- Enter start, end.
- Select Calculate to view the result.
- Check the method and assumptions below before using the result.
Input reference and sample values
Use the units and choices shown for each field. Sample values are provided for practice, not as recommendations.
| Input | Format and units | Sample |
|---|---|---|
| Start | Whole numbers only. Zero or positive. Maximum: 10000000. | 1 |
| End | Whole numbers only. Zero or positive. Maximum: 10000000. | 100 |
Result for these sample inputs
2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97
- Prime count
- 25
Select Try the example in the form to load these values and calculate them again. This replaces the current form inputs. Compare the result with the method and worked explanation below.
The method, explained
Visit each integer in the inclusive interval and test divisibility up to its square root. Retain exactly the numbers with two positive divisors.
Using start = 1, end = 100, the result is 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97. Change these example inputs to match your task; use the method above to check each step.
What to keep in mind
Endpoints at most ten million; interval width at most 10,000. Finite-precision arithmetic is used. Check the domain and the stated convention before using an approximation.
Common questions
Are both endpoints included?
Yes. If either endpoint is prime it is included. Zero and one are never included because they do not meet the definition of a prime.
How can I check the result?
Visit each integer in the inclusive interval and test divisibility up to its square root. Retain exactly the numbers with two positive divisors. The worked example uses editable inputs. Calculations run on your device; no external API or account is required.
Methodology maintained by ClarityKit. How these tools are built and checked.