Largest Prime Gap Calculator

Find the largest gaps between consecutive primes, compare records, inspect normalized measures, rank results, visualize patterns, and export detailed calculations efficiently online today instantly.

Calculator Inputs

Choose one search method. Hidden fields remain available for later modes.

Reset
Preparing prime search… 0%

Formula Used

A prime gap measures consecutive prime separation. The formula is gn = pn+1 − pn. Larger values mark wider prime-free intervals.

The normalized gap divides the gap by ln(pn). Cramér comparison uses [ln(pn)]². These measures compare gaps across changing number scales.

How to Use

Select a search mode and enter valid integers. Choose filters, precision, and a practical block size. Press calculate to inspect ranked prime gaps.

Use boundary primes for crossing interval edges. Record mode starts from two for global context. Export tables after reviewing every calculated value.

Example Data

Range Lower prime Upper prime Gap
2 to 10089978
100 to 15011312714
500 to 60052354118

Prime Gap Notes

Every prime after two is odd. Therefore later consecutive prime gaps are even. Twin primes always create a gap of two.

Record gaps exceed all earlier observed gaps. They become rarer as the search grows. Efficient segmented sieves reduce memory during large searches.

Frequently Asked Questions

What is a prime gap?

It is the difference between consecutive prime numbers. No other prime lies between those endpoints. The calculator verifies this ordering automatically.

Why are most prime gaps even?

Every prime greater than two is odd. Subtracting two odd integers gives an even number. The first gap remains the only exception.

What is a record prime gap?

A record gap exceeds every earlier prime gap. Global records require scanning from the prime two. Range records only describe the selected interval.

What does normalized gap mean?

It divides the observed gap by a logarithmic estimate. This supports comparisons at different prime sizes. Larger normalized values indicate unusually wide spacing.

What is the Cramér benchmark?

It uses the square of the natural logarithm. Researchers compare large gaps with this scale. It is a comparison, not a proof.

Why include boundary primes?

A large gap may cross a selected boundary. Extra primes reveal those crossing intervals. Disable this option for strict internal pairs.

What block size should I choose?

Larger blocks may process faster but use memory. Smaller blocks reduce peak memory usage. The default balances both needs for common searches.

Can it verify two supplied primes?

Yes, manual mode checks both endpoints first. It then searches for primes between them. A valid result confirms consecutive prime status.

Why does the calculator limit ranges?

Large prime searches require substantial processing resources. Limits protect server memory and response times. Divide larger studies into several smaller ranges.

Related Calculators

Algebra CalculatorEquation CalculatorInterval Notation CalculatorLogical Sets CalculatorPI Product Notation CalculatorPolynomials CalculatorRational Expressions CalculatorTesting Solutions CalculatorWord Problems Calculatorangle to decimal calculator

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.