When most of us go to the beach, we like to play in the sand, frolic in the surf and people watch.

I like all those things, too. But I am also a massive science nerd, and that means that despite the distractions, I cannot tear my attention away from the horizon.

Oh, that line separating Earth from sky, planet from heavens and here from infinity—my eye is drawn to the horizon as inexorably as matter to a black hole. I get squinty and teary trying to focus on it, which is a fool’s errand because, in a sense, the horizon doesn’t exist.

It’s as real as a rainbow in that you can *see* it, but no curious sojourner can ever arrive there; as you approach the horizon, it always recedes out of reach.

Despite its seemingly magical properties, though, the horizon is something firmly governed by science and math—specifically geometry.

The horizon is an inevitable property of living on a planet. If you were floating in space (or if Earth were transparent), then anywhere you looked, you’d see sky. But alas, our planet is quite opaque. Thus, the horizon is where you see the “edge” of Earth against the sky or, geometrically speaking, where the line of your gaze is tangent to the ground: Extend a line from your eye to the horizon, and that line will *just* touch the surface of Earth before extending onward into space. Look slightly up from that angle, and you will see the sky; look lower, and you will see the ground.

Earth is a sphere, more or less, and it blocks approximately half the sky. Because it’s a large sphere, compared with an individual human—its radius is about 6,400 kilometers, compared with a human height of, say, 0.00175 km—it appears flat, and the horizon is a circle centered on your position.

If you were on a perfectly smooth sphere the size of Earth and lay down so that your eyeline was right on the ground, the horizon would be negligibly distant from you. At any height above that, you’d have to look slightly downward to see the horizon. From the average height of a human, that angle is too small to discern, so it feels like you’re looking straight out. But the higher you go, the bigger that angle is and the more *downward* you have to look. If you were far out in space, Earth would appear small, so you’d have to look nearly straight down toward your feet to see its “edge.”

So the higher up your eye is, the farther from you the horizon appears to be. The fun part is that we can actually calculate that distance using a little math.

(Note: If you’re a mathophobe, you might want to skip the next few sentences. I happen to think math is cool, and I think that because it is.)

The diagram above shows you the situation. You are a human stick figure standing on a perfectly spherical Earth and looking out to the horizon. Your height is *h,* and the distance to the horizon is *d*. The radius of Earth is *R**,* which, again, is about 6,400 km. If you reach back into dim, dusty memories of high school geometry, you can see this scenario forms a right triangle, where the two sides are *d* and *R* and the hypotenuse is *R* + *h*.

We want to know the value of *d,* and Pythagoras can help us here: in a right triangle, the sum of the squares of the two sides is equal to the square of the hypotenuse. (As an aside, because I can’t help myself, the Scarecrow got that wrong in the film *The Wizard of Oz,* so his diploma may not have been duly earned.) Thus, we use this equation:

*d*^{2} + *R*^{2} = (*R* + *h*)^{2}

When we apply some rules of algebra to the equation and solve for *d,* we get:

*d* = √(*h*^{2} + 2*Rh*)

Here we can use a helpful simplifying math trick: the radius of Earth is large compared with your height, so *h*^{2 }is really small compared to 2*Rh*, and we can ignore it. Now we just have:

*d* = √(2*Rh*)

That’s pretty easy to calculate! You can make it even easier because Earth’s radius is a constant, as is the number 2. If you want the distance in kilometers and use a height in meters, a little fiddling with the math makes this equation:

Distance in kilometers = 3.58 x √(height in meters)

If you’ve made it this far, let’s crunch the numbers. If your eyes are 1.5 meters off the ground, then the horizon is 3.58 x √1.5, which equals about 4.4 km away. Neat! So when you’re standing on the sand, gazing across the ocean to the far horizon, now you know just *how* far you’re seeing.

Let’s look again to the example above, where you are lying down and your eye is almost on the ground. That means *h* = 0, which in turn means *d*** **= 0, as promised.

The higher you go, the farther away the horizon is. If you were looking out a second-floor window at a height of about 5 m, the horizon would be 8 km distant. Go up higher, and it’s farther yet.

How about from an airplane? If you’re cruising at an altitude of 10,000 m, the horizon is nearly 360 km away! From the International Space Station in orbit, at a height of 420 km, the horizon is more than 2,300 km away; if you were to gaze out of a window, the entire U.S. Eastern Seaboard would be visible.

This leads to a fun exercise that you can do yourself. The next time you’re at the beach (or some other place with a clear horizon view) at sunset, just before the upper part of the sun slips below the horizon, squat down to bring your eyes closer to the ground. The moment the sun disappears from view, immediately stand up. You’ll see the sun again! That’s because as your perspective rises, the horizon correspondingly drops down, bringing the sun back into visibility for a second or so. I’ve done this, and it’s pretty cool despite the strange looks you might get from people around you.

Mind you, this math falls apart if you get too high up; we ignored that *h*^{2} term for a human on the ground, and if that value gets big, it has an impact. But this is close enough for the elevations we flatlanders usually deal with.

A bigger issue is that our atmosphere acts like a lens, refracting light that passes through it, and this effect is biggest at the horizon, where light must move through the most air to reach your eyes. This allows you to see objects *beyond* the physical horizon because their light gets refracted downward. In a vacuum, that light would pass over your head, but our planet’s air instead bends it into your eye. This gets complicated quickly, but in the end the 3.58 multiplicative factor becomes 3.86—so your perceived horizon is approximately 8 percent farther away than it would be without air.

Earth is a big planet, but in reality, at any one time, you can only see a very tiny part of it (about 0.00001 percent for a height of 1.5 m). If you’ve ever had an itch to travel, this might inspire you. It’s always a good idea to broaden your horizons.