I found this on another site but can someone please explain it.

Would that be (muzzle velocity)^2 / 2(gravity)

Question
A man fires a rifle of muzzle velocity 500ms at a fixed target 100m away. If the gun is pointing directly at the target, by how much does the bullet miss?

My Attempt
Time = d/t = 100/500 = 0.2
9.8 / 0.2 = 1.96m
The bullet would miss by 1.96m

A good trick on all physics problems like this is to guess at the answer first. Picture this scenerio in your mind. You're aiming at a target a football field away. The bullet drops a little before it hits the target. Does 1.96 meters seem like a reasonable amount? It does to me.

Imagine you got your formula backwards and did 9.8 / (500/100). You'd get 49 meters. Would that seem reasonable? Not!

Or imagine you did 500 / 9.8 * 100= 5104. Does that seem reasonable? Not.

There's an infinite range of numbers you can come up with if you do the problem wrong, and only one answer if you do it right. The odds that a wrong answer will be approximately equal to the right answer are small, so if you have good intuition and your computed answer is close to your intuitative answer there's a good chance it's right.