Study prime intervals across custom ranges confidently. Spot large jumps, averages, medians, and sequence behavior. Export findings and visualize gaps for sharper numeric insight.
| Range Start | Range End | Consecutive Pair | Gap | Note |
|---|---|---|---|---|
| 2 | 30 | 3 and 5 | 2 | Twin prime gap |
| 2 | 30 | 7 and 11 | 4 | Cousin prime gap |
| 2 | 50 | 23 and 29 | 6 | Sexy prime gap |
| 50 | 100 | 89 and 97 | 8 | Larger observed spacing |
| 100 | 150 | 113 and 127 | 14 | Notable larger gap |
Prime Gap Formula: For consecutive primes pn and pn+1, the gap is:
gn = pn+1 - pn
This calculator first finds every prime inside the chosen range. It then subtracts each prime from the next consecutive prime. After that, it summarizes minimum, maximum, mean, and median gap values.
Common special cases include gap 2 for twin primes, gap 4 for cousin primes, and gap 6 for sexy primes. Larger gaps are also measured directly from the generated sequence.
A prime gap is the difference between two consecutive prime numbers. If the primes are 11 and 13, the gap is 2. The calculator measures these distances across your chosen range.
Except for the pair 2 and 3, all primes are odd. The difference between two odd numbers is always even. That is why prime gaps after the first pair are generally even numbers.
Twin primes are consecutive primes separated by a gap of 2, such as 17 and 19. This page labels those rows as Twin in the output table for easy identification.
It hides rows below your chosen threshold. For example, if you enter 6, the results table shows only prime pairs with gap 6 or greater, while summary statistics still reflect the full measured sequence.
The average gap equals the sum of all measured consecutive prime gaps divided by the number of gaps. It gives a quick overview of spacing behavior across the selected interval.
Small ranges or strict filters can greatly reduce displayed rows. A high minimum gap filter, low row limit, or narrow interval may leave only a few consecutive prime pairs to show.
The Plotly chart shows the visible gap sequence from the filtered table. Each x-axis label represents a consecutive prime pair, and the y-axis value represents the gap between them.
Yes. When results are available, you can export the displayed table as CSV or generate a PDF summary. That makes it easier to save, compare, or share your calculations.
Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.