A prime gap is the difference between two successive prime numbers. The -th prime gap, denoted or is the difference between the th and the -th prime numbers, i.e.,
For example, since the first few primes are 2, 3, 5, 7, 11..., we have , , . The sequence of prime gaps has been extensively studied; however, many questions and conjectures remain unanswered.
The first 60 prime gaps are: 1, 2, 2, 4, 2, 4, 2, 4, 6, 2, 6, 4, 2, 4, 6, 6, 2, 6, 4, 2, 6, 4, 6, 8, 4, 2, 4, 2, 4, 14, 4, 6, 2, 10, 2, 6, 6, 4, 6, 6, 2, 10, 2, 4, 2, 12, 12, 4, 2, 4, 6, 2, 10, 6, 6, 6, 2, 6, 4, 2, ... .
By the definition of every prime can be written as
Simple observations The first, smallest, and only odd prime gap is the gap of size 1 between 2, the only even prime number, and 3, the first odd prime. All other prime gaps are even. There is only one pair of consecutive gaps having length 2: the gaps and between the primes 3, 5, and 7.
For any integer , the factorial is the product of all positive integers up to and including . Then in the sequence
the first term is divisible by 2, the second term is divisible by 3, and so on. Thus, this is a sequence of consecutive composite integers, and it must belong to a gap between primes having length at least . It follows that there are gaps between primes that are arbitrarily large, that is, for any integer , there is an integer with .
However, prime gaps of numbers can occur at numbers much smaller than . For instance, the first prime gap of size larger than 14 occurs between the primes 523 and 541, while 15! is the vastly larger number 1 307 674 368 000.
The average gap between primes increases as the natural logarithm of these primes, and therefore the ratio of the prime gap to the primes involved decreases (and is asymptotically zero). This is a consequence of the prime number theorem. From a heuristic view, we expect the probability that the ratio of the length of the gap to the natural logarithm is greater than or equal to a fixed positive number to be ; consequently the ratio can be arbitrarily large. Indeed, the ratio of the gap to the number of digits of the integers involved does increase without bound. This is a consequence of a result by Westzynthius..
In the opposite direction, the twin prime conjecture posits that for infinitely many integers .
Numerical results Usually the ratio is called the merit of the gap . Informally, the merit of a gap can be thought of as the ratio of the size of the gap compared to the average prime gap sizes in the vicinity of .
The largest known prime gap with identified probable prime gap ends has length , with -digit probable primes and merit , found by Andreas Höglund in . The largest known prime gap with identified proven primes as gap ends has length and merit 25.90, with -digit primes found by P. Cami, M. Jansen and J. K. Andersen.
As of September 2026, the largest known merit value is 42.5192, found by Mario Vojvoda with the 611-digit prime 17440361647223 × 1439# / 2310 − 21464 and the gap of 59724. The first gap with merit over 40, discovered by the Gapcoin network in 2017, has merit 41.93878373 with the 87-digit prime 293703234068022590158723766104419463425709075574811762098588798217895728858676728143227.
+ Largest known merit values (as of September 2026) Merit gn digits pn Date Discoverer 42.519 2 59724 611 17440361647223 × 1439# / 2310 − 21464 2026 Mario Vojvoda 41.938 784 8350 87 see above 2017 Gapcoin 41.588 2 58416 611 17325055497313 × 1439# / 2310 − 29514 2026 Mario Vojvoda 41.485 3 58272 611 17546437666213 × 1439# / 2310 − 18058 2026 Mario Vojvoda 40.572 9 57006 611 25769303913071 × 1439# / 2310 − JL1 2026 Mario Vojvoda 40.556 3 56982 611 25394073504871 × 1439# / 2310 − 26730 2026 Mario Vojvoda 40.246 842 1854 21 see below 2026 Robert Smith 40.031 0 13326 145 363988776293 × 337# / 210 − 4854 2026 Seth Troisi 39.889 8 56046 611 25684834227557 × 1439# / 2310 − JL2 2026 Mario Vojvoda 39.620 154 15900 175 3483347771 × 409# / 30 − 7016 2017 Dana Jacobsen The Cramér–Shanks–Granville ratio is the ratio . If we discard anomalously high values of the ratio for the primes 2, 3, and 7, then the greatest known value of this ratio is 0.9206386 for the prime 1693182318746371. For comparison, the gap discovered by the Gapcoin network (with merit 41.9) has a Cramér–Shanks–Granville ratio of just 0.2058791. Other record terms can be found at .
We say that is a maximal gap, if for all . , the largest known maximal prime gap has length 1854, found by Robert Smith, using code by Brian Kehrig. It is the 85th maximal prime gap, and it occurs after the prime 101412319996363309069. Other record (maximal) gap sizes can be found in , with the corresponding primes in , and the values of in . The sequence of maximal gaps up to the -th prime is conjectured to have about terms.
|+ The 85 known maximal prime gaps |-style="vertical-align: top;" | + Gaps 1 to 29 # gn pn n 1 1 2 1 2 2 3 2 3 4 7 4 4 6 23 9 5 8 89 24 6 14 113 30 7 18 523 99 8 20 887 154 9 22 1,129 18910 34 1,327 21711 36 9,551 1,18312 44 15,683 1,83113 52 19,609 2,22514 72 31,397 3,38515 86 155,921 14,35716 96 360,653 30,80217 112 370,261 31,54518 114 492,113 40,93319 118 1,349,533 103,52020 132 1,357,201 104,07121 148 2,010,733 149,68922 154 4,652,353 325,85223 180 17,051,707 1,094,42124 210 20,831,323 1,319,94525 220 47,326,693 2,850,17426 222 122,164,747 6,957,87627 234 189,695,659 10,539,43228 248 191,912,783 10,655,46229 250 387,096,133 20,684,332
+ Gaps 30 to 58 # gn pn n30 282 436,273,009 23,163,29831 288 1,294,268,491 64,955,63432 292 1,453,168,141 72,507,38033 320 2,300,942,549 112,228,68334 336 3,842,610,773 182,837,80435 354 4,302,407,359 203,615,62836 382 10,726,904,659 486,570,08737 384 20,678,048,297 910,774,00438 394 22,367,084,959 981,765,34739 456 25,056,082,087 1,094,330,25940 464 42,652,618,343 1,820,471,36841 468 127,976,334,671 5,217,031,68742 474 182,226,896,239 7,322,882,47243 486 241,160,624,143 9,583,057,66744 490 297,501,075,799 11,723,859,92745 500 303,371,455,241 11,945,986,78646 514 304,599,508,537 11,992,433,55047 516 416,608,695,821 16,202,238,65648 532 461,690,510,011 17,883,926,78149 534 614,487,453,523 23,541,455,08350 540 738,832,927,927 28,106,444,83051 582 1,346,294,310,749 50,070,452,57752 588 1,408,695,493,609 52,302,956,12353 602 1,968,188,556,461 72,178,455,40054 652 2,614,941,710,599 94,906,079,60055 674 7,177,162,611,713 251,265,078,33556 716 13,829,048,559,701 473,258,870,47157 766 19,581,334,192,423 662,221,289,04358 778 42,842,283,925,351 1,411,461,642,343
+ Gaps 59 to 85 # gn pn n59 804 90,874,329,411,493 2,921,439,731,02060 806 171,231,342,420,521 5,394,763,455,32561 906 218,209,405,436,543 6,822,667,965,94062 916 1,189,459,969,825,483 35,315,870,460,45563 924 1,686,994,940,955,803 49,573,167,413,483641,132 1,693,182,318,746,371 49,749,629,143,526651,184 43,841,547,845,541,059 1,175,661,926,421,598661,198 55,350,776,431,903,243 1,475,067,052,906,945671,220 80,873,624,627,234,849 2,133,658,100,875,638681,224 203,986,478,517,455,989 5,253,374,014,230,870691,248 218,034,721,194,214,273 5,605,544,222,945,291701,272 305,405,826,521,087,869 7,784,313,111,002,702711,328 352,521,223,451,364,323 8,952,449,214,971,382721,356 401,429,925,999,153,707 10,160,960,128,667,332731,370 418,032,645,936,712,127 10,570,355,884,548,334741,442 804,212,830,686,677,669 20,004,097,201,301,079751,476 1,425,172,824,437,699,411 34,952,141,021,660,495761,488 5,733,241,593,241,196,731 135,962,332,505,694,894771,510 6,787,988,999,657,777,797 160,332,893,561,542,066781,526 15,570,628,755,536,096,243 360,701,908,268,316,580791,530 17,678,654,157,568,189,057 408,333,670,434,942,092801,550 18,361,375,334,787,046,697 423,731,791,997,205,041811,552 18,470,057,946,260,698,231 426,181,820,436,140,029821,572 18,571,673,432,051,830,099 428,472,240,920,394,477831,676 20,733,746,510,561,442,863 477,141,032,543,986,017841,724 68,068,810,283,234,182,907 1,524,717,378,371,224,128851,854 101,412,319,996,363,309,069 2,251,483,061,895,611,799
Further results
Upper bounds Bertrand's postulate, proven in 1852, states that there is always a prime number between and (for all k ≥ 2), so in particular , which means .
The prime number theorem, proven in 1896, says that the average length of the gap between a prime and the next prime will asymptotically approach , the natural logarithm of , for sufficiently large primes. The actual length of the gap might be much more or less than this. However, one can deduce from the prime number theorem that the gaps get arbitrarily smaller in proportion to the primes: the quotient
In other words (by definition of a limit), for every , there is a number such that for all ,
Hoheisel (1930) was the first to show a sublinear dependence; that there exists a constant such that
hence showing that for sufficiently large ,
Hoheisel obtained the possible value 32999/33000 for . This was improved to 249/250 by Heilbronn, and to , for any , by Chudakov.
A major improvement is due to Ingham, who showed that for some positive constant c, if then for any
Here, O refers to the big O notation, ζ denotes the Riemann zeta function and π the prime-counting function. Knowing that any is admissible, one obtains that θ may be any number greater than 5/8.
Since 5/8+ε < 2/3, and the gap between consecutive cubes is of the order of , it follows that there is always a prime number between n3 and , if n is sufficiently large. In 2016, Dudek gave an explicit version of Ingham's result: there are primes between consecutive cubes for all .
The Lindelöf hypothesis would imply that Ingham's formula holds for c any positive number: but even this would not be enough to imply that there is a prime number between n2 and for n sufficiently large (see Legendre's conjecture). To verify this, a stronger result such as Cramér's conjecture would be needed.
Huxley in 1972 showed that one may choose .
A result, due to Baker, Harman and Pintz in 2001, shows that θ may be taken to be 0.525.
The above describes limits on all gaps; another area of interest is the minimum gap size. The twin prime conjecture asserts that there are always more gaps of size 2, but remains unproven. In 2005, Daniel Goldston, János Pintz and Cem Yıldırım proved that
and 2 years later improved this to
In 2013, Yitang Zhang proved that
meaning that there are infinitely many gaps that do not exceed 70 million. A Polymath Project collaborative effort to optimize Zhang's bound managed to lower the bound to 4680 on July 20, 2013. In November 2013, James Maynard introduced a new refinement of the GPY sieve, allowing him to reduce the bound to 600 and also show that the gaps between primes m apart are bounded for all m. That is, for any m there exists a bound Δm such that for infinitely many n. Using Maynard's ideas, the Polymath project improved the bound to 246.
On August 28, 2026, an argument discovered by GPT-5.6 Sol and presented by Hanxin Zhang claimed an improvement on the Polymath8b bound from 246 to 240.https://zenodo.org/records/22240510https://github.com/hanxinzhang/prime-bound 3 days later Julia Stadlmann submitted a preprint developing new techniques and also claiming to reduce the bound to 240. In work dating 1 September, 2026 Shiva Kintali with unspecified AI agents claimed an improvement of the bound to 236.https://shivakintali.github.io/papers/Prime-Gaps.pdf On September 3 Axiom Math with AxiomProver claimed an improvement of the bound to 212https://primegaps.axiommath.ai/bgp212.pdf and a few hours before (on September 2 in USA) OpenAI using GPT-6 Astra produced a further claim to the bound to 186.
As of September 2026, none of those claims has been peer-reviewed, leaving the established bound at 246.
Assuming the Elliott–Halberstam conjecture and its generalized form, the bound has been reduced to 12 and 6, respectively.
Lower bounds In 1931, Erik Westzynthius proved that maximal prime gaps grow more than logarithmically. That is,