Are there arbitrarily large gaps between consecutive primes? I made a program to find out the number of primes within a certain range, for example between $1$ and $10000$ I found $1229$ primes, I then increased my range to $20000$ and then I found $2262$ primes, after doing it for $1$ to $30000$, I found $3245$ primes.

Now a curious thing to notice is that each time, The probability of finding a prime in between $2$ multiples of $10000$ is decreasing, i.e it was $$\frac{2262-1229}{10000}=0.1033$$ between $10000$ and $20000$, and $$\frac{3245-2262}{10000}=0.0983$$ between $20000$ and $30000$, 

So from this can we infer that there will exist two numbers separated by a gap of $10000$ such that no number in between them is prime? If so how to determine the first two numbers with which this happens? Also I took $10000$ just as a reference here, what about if the gap between them in general is $x$, can we do something for this in generality?

Thanks!
Can we infer that there exist two numbers separated by a gap of $10000$, such that no number in between them is prime?


We can infer this regardless of what you wrote.

For every gap $n\in\mathbb{N}$ that you can think of, I can give you a sequence of $n-1$ consecutive numbers, none of which is prime.

There you go: $n!+2,n!+3,\dots,n!+n$.

So there is no finite bound on the gap between two consecutive primes.
There several factors determining the size of gaps.  As per you example 10,000 has a square root of 100 which give you 25 prime number divisors for the 10,000 and the 20,000 square root is 141 and 34 divisors, and the 30,000 square root is 173 and 40 divisors.  The number of divisors helps to determine the gaps.  The number of factors needed is based on the square root of your max number.  The square roots are decreasing percentage of the max number: example 100 / 10000 = 1.000%, 141 / 20000 = .70500% and 173 / 30000 = .57666%.  The number of factors increased against the square root but decreases against the max number.  Example:  106,749,747,000,000 the square root is 10,331,977 the square root % is .00000968% with 685,159 factors the max gap in my sample 712.  The large gaps seam to have a cycle pattern to them.