This formula is an approximation: until 550 km or 342 mi the error stays within ∓0.032%. Until 800 km or 497 mi the error is less than 0.1%.
Click in the graph above to get all values for a certain point.
The deviation of the approximated value from the real value is shown in the Calculator Form at ~x - x absolute or as the relative error in % in the orange field (~x-x)/x.
This approximation formula can also be used to approximate h, since for distances less than 258.5 km or 160.2 mi the error for h is less than 0.1%. But generally h is always greater than x and the deviation between them grows exponentially.
Strictly speaking x is not the curvature of the earth but the drop from the tangential plane (blue line in Sketch 1) at a distance s from the observer. The curvature k of a sphere is defined as the reciprocal of its radius: k = 1 / r.
The drop x is not what is hidden by the curvature of the earth! This would only be the case if the observers eyes are at the surface. If the observers eyes are at an altitude greater than 0 the hidden part is less than x. In fact if the observer is high enough he can always see the whole object in the distance.
For equations for Hidden Parts see:
Standard Refraction bends light downwards in an arc with a radius of about 7 times the radius of the earth. This means that far objects appear lifted and can come into view from behind the horizon. After sunset, when the ground is cooling faster than the air above, near the ground you can easily get refraction coefficients way beyond 1.  Flat earthers alway conduct their laser test very near the ground after sunset over cool water or ice. In such conditions it is expected to see a laser over any distance. Such experiments to prove the earth is flat are flawed, as Strong Refraction at Bedford Targets shows.
A convenient method to analyze the effect of refraction on visibility is to consider an increased apparent radius of the earth R'. Under this model the light rays can be considered straight lines on an earth of increased radius. R' = 7/6 · R corresponds to Standard Refraction, where R = 6371 km is the radius of the earth.
I will derive the exact formulas for h and then x from s and r and then show how the approximation for x is derived from that and why it is accurate enough as long as s is much smaller than r.
First we need the angle a, that can be calculated from s and r. On a circle with radius r = 1 the circumference is 2π, which is also the angle a of the full circle. So the angle a in radian of a unit circle is always equal to the length of a corresponding segment of length s. If we have a circle of radius r instead, we simply have to divide s through r to get the corresponding angle a:
The distance d can now be calculated from the angle a and the radius r. The tangent of the right-angled triangle [r,d,r+h] is tan(a) = d / r. Solving for d gives:
Using Pythagoras we can now calculate h:
We expand the square on the right hand side:
The radius squared can be subtracted from both sides:
We can rearrange this formual to get a quadratic equation for the unknown h:
Inserting d from (3) gives the following quadratic equation for h:
To calculate h we can use the method for solving a Quadratic equation. We substitute p = 2·r and q = −[r·tan(s/r)]2 to get the normal form of the quadratic equation:
Solving the quadratic equation for h gives the two solutions:
We are only interested in the positive solution:
In our case is p = 2·r and q = −[r·tan(s/r)]2:
Factoring out r we finally get a formula for h:
Here is another equivalent formula for h:
We can see in Sketch 2 that, using trigonometry, x = r − r·cos(a). Factoring out r gives:
which can be seen from Sketch 1. This is how (14) is derived.
We can simplify the derived formulas (15), (13) and (14) by taking advantage of the fact that in practice s is much smaller than r. In this case the angle a is very small and we can replace the tan and cos functions by the first 2 terms of the corresponding Taylor series. We will see that in this approximations the length x and h will be the same.
Lets find first an approximation for x from the formula (15):
The cos function can be approximated by its taylor series:
Note ! is the factorial function: n! = 1·2·3·...·n, so 2! = 1·2 and 4! = 1·2·3·4 etc.
Now if a is much smaller than 1, then a4, a6... are even much, much smaller than 1. So these terms are negligible and we can simplify the cos function because the red terms do not contribute much to the result:
Lets plug in this into (17):
The red 1's cancel and we finally get:
We have now seen that for the case that
How do we get to 8" per miles squared? We are almost done. We only have to put in the radius of the earth r in miles so the result is in statute miles. Than we multiply by a conversion factor c = 63,360 in/mi to get inches from miles. The constants can be collected together and we get:
We round 8.0024 to 8 and finally get:
Now lets find an approximation formula for h using the first formula (13):
The tan function taylor series is:
Now if a is much smaller than 1, then a2, a3, a4 ... are even much, much smaller than 1. So these terms are negligible and we can simplify the tan function because the red terms do not contribute much to the result:
So if we plug in this into (25) we get:
We can even simplify more, if we use the taylor series for √1 + x2:
If we plug in this into (28) we get:
The red 1 and −1 cancel and we finally get:
We can simplify the second formula (14) for h in a similar fashion as shown above.
The cos function taylor series is:
For small angles a we can omit the red terms, because they do not contribute to the result. If we plug in this into (32) we get:
If a ≪ 1 then a2/2 is even much smaller than 1, so we can replace the red term by 1:
And we get finally the same result as in the section above:
How much of an object is hidden behind the curvature of the earth, the so called hidden height hh, depends on the distance of the object from the observer and from the height of the observers eye above the surface hO. The distance can be expressed as the line of sight d to the object, tangent to the horizon, or as the arc length s along the surface of the earth between observer and target.
Note: To calculate the hidden height you must not use the famous equation 8 inches per miles squared! This equation is an approximation to calculate the drop of the earth surface from a tangent line on the surface at the observer. It calculates not the hidden part of an object.
Depending on whether you know the line of sight distance d or the distance along the surface s the following equations calculate the hidden height exactly:
The same equations can be used to calculate the hidden height with and without refraction. You simply have to choose the corresponding value for R. Because under standard refraction the earth looks less curved, you can use a bigger radius for the earth than it is in reality. For standard refraction 7/6 · Rearth use R = 7433 km. For standard refraction k = 0.17 use R = 7681 km.
There are multiple slightly different values for standard refraction in use. Near the ground the bigger value is more accurate. For higher altitudes the smaller value is more accurate. If you press the button Std the App calculates refraction depending on the observer altitude. Near sea level refraction is about k = 0.17.
The hidden height equations are only valid if the object lies behind the horizon. That is if the distance to the horizon dH or sH is less than the distance to the target d or s.
The exact distances to the horizon can be calculated with the following equations:
If the observer height hO is much smaller than the radius of the earth R, the Exact Equations for the Hidden Height can be simplified by the following approximation:
Note: for observer height much less than the radius of the earth, the line of sight distance d and the surface distance s are identical for all practical purposes. So the equation above holds for both cases.
The distance to the horizon can also be approximated by the following equation:
Conclusion: For all practical purposes while the observer is within the troposphere, so that the observer height hO is much less than the radius of the earth R, you can use the approximation equations. In this case for the distance between observer and target you can use the line of sight or the distance along the surface. They are practically identical.