It depends on a number of factors, like the type of gun, its age, the type of pellet used, the weather, and so on.
A 177 pellet can fly roughly 400 yards with an ordinary rifle, according to estimates. When it gets there, however, it won't have much power.