# Tight bounds on the prime counting function

What are the best bounds for $\pi(x)$ i.e. the number of primes less than or equal to $x$ ?

From Wikipedia I saw that:

$$\frac{x}{\ln x}\left(1 + \frac{1}{\ln x}\right) < \pi(x) < \frac{x}{\ln x}\left(1 + \frac{1}{\ln x} + \frac{2.51}{(\ln x)^2}\right)$$

(result by Pierre Dusart)

Are there tighter bounds? (possibly with a simple expression like the one above)

• This article looks somewhat interesting. It has some estimates which may prove better than what you've got there. math.uiuc.edu/~hildebr/ant/main3.pdf. I believe that math.stackexchange.com/questions/242979/… also has some pertinent information. – Ian Coley May 14 '13 at 16:46
• You should be more precise about what kind of bounds you are looking for. Are you looking for explicit inequalities, like you've written above? if so, is it ok if they're valid only for sufficiently large $x$? Or would you be content with a bound with an inexplicit constant, whose error term is much smaller than the above? if so, read up on the Prime Number Theorem. – Greg Martin May 14 '13 at 16:47
• @GregMartin: I'm not an expert, I'm more interested in explicit inequalities that hold above an arbitrarily large $x$. – Vor May 14 '13 at 17:03