Given a prime number x, is there a guarranteed max gap before next Prime Number appears.

Solution 1:

Bertrand's Postulate states that there's always a prime between $x$ and $2x$ giving a bound of $y-x\leq x$.

Solution 2:

Well the Bertrand–Chebyshev theorem states there is always a prime between $n$ and $2n$ for any $n>1$. Hence, given a prime, $p$, there is guaranteed to be a prime within $2p$. I am sure that can be reduced, as you have noted there is probably a prime within $2\sqrt{n}$, but this appears to be conjecture at the moment.

In practice, primes appear far far far more frequently than we understand them. We know that the probability a random number $n$ is prime is

$$\frac{1}{\log(n)}$$

This is the prime number theorem. Hence, the frequency of primes is so common that even the reciprocals of prime numbers still diverge (this is known as density, "the primes are very dense within the integers"),

$$\sum_{n=1}^{\infty}\frac{1}{p_n} = \infty$$

Proved by Euler. Something like the squares have converging reciprocals and are therefore not very dense and extremely sparse. Based on the prime number theorem, there is a 50% you will find a prime within $[n,n+\log(n)]$. Continuing this binomial distribution, for example, if $n$ is a 1000 digit number, then the probability of finding a prime within 1,000,000 (which is nothing compared to the size of $n$) of $n$ is $1-2.225e^-189$ (a very near certainty).

Primes are extremely more common than $2\sqrt{n}$. No one really knows why.