# A Mountain and a Horizon Line
Al-Biruni first measured the mountain's height from the ground. Then he climbed to the summit and obtained the angle between the horizontal line and the distant horizon. From the top of a mountain, the horizon appears slightly below the horizontal line — and that tiny difference carries important information about the Earth's curvature.
In fact, the entire method needed just two numbers: the mountain's height and the dip angle of the horizon. Plugging those two numbers into one geometric relation yields the Earth's radius.
The method at a glance
Mountain height
Horizon dip angle
Trigonometry
Earth's radius
In this article we examine Al-Biruni's method simply and step by step, and at the end we run the very same calculation in Python.
# How Was the Earth's Size Computed Before Al-Biruni?
About thirteen centuries before Al-Biruni, Eratosthenes had estimated the Earth's circumference by comparing the sun's angle of incidence in two cities and knowing the distance between them. Eratosthenes' method was clever, but it required two distant cities and a measurement of the distance between them. Al-Biruni found a method where every measurement happens in a single region.
Al-Biruni's method
All measurements in one region: one mountain, three angles, and one short distance.
One region → Earth's radius
Eratosthenes' method
Required two distant cities and an accurate measurement of the distance between them.
Two cities + distance → circumference
Abu Rayhan Muhammad ibn Ahmad al-Biruni, the Khwarazmian scholar, lived from 973 to 1048 CE. He tested his method on a mountain in the Nandana region. The method is described in works such as "The Determination of the Coordinates of Cities" (Tahdid Nihayat al-Amakin) and the "Canon Masudicus".
# The Problem Reduces to Two Measurements
Al-Biruni's method has two stages:
01
From the foot of the mountain
Find the mountain's height without going to the exact point beneath the summit.
02
From the top of the mountain
Measure the dip angle of the horizon relative to the horizontal.
After these two measurements, the rest is pure trigonometry.
# Stage One — Finding the Mountain's Height from Two Points
We pick two points on roughly level ground. The distance between them is
d. From the nearer point, the summit is seen at angle α; from the farther point, at angle β. Since the first point is closer to the mountain, α will be larger than β.
Triangulation: one distance and two angles give the mountain's height
Calling the mountain's height
h, the two angles lead to this relation:
FORMULA 01
h
=
d
×
tan(α) · tan(β)
tan(α) − tan(β)
The advantage of this method is that we never need the distance to the exact point beneath the summit — that point usually lies inside the mountain and is inaccessible. Measuring the distance between the two observation spots and the two angles is enough.
Today we call this Triangulation: with one distance and two angles, we find a height that cannot be measured directly.
# Stage Two — How Much Lower Does the Horizon Appear?
Now we climb to the summit. From the top of the mountain, the horizon is not exactly at eye level — it appears slightly lower. This difference is called the Dip Angle of the horizon, denoted
δ.
The line from our eye to the horizon touches the Earth's surface at exactly one farthest point. The Earth's radius at that point is perpendicular to the line of sight. This creates a right triangle between the Earth's center, the summit, and the horizon point:
Right triangle: Earth's center, the summit, and the horizon point
In this triangle:
R
Distance from Earth's center to the horizon
The Earth's radius itself — our main unknown
R+h
Distance from Earth's center to the summit
The Earth's radius plus the mountain's height
δ
Dip angle of the horizon
The angle between the horizontal and the line of sight
Therefore:
FORMULA 02
cos(δ)
=
R
R + h
FORMULA 03 — SOLVED FOR R
R
=
h
×
cos(δ)
1 − cos(δ)
With this single formula, a mountain a few hundred meters tall yields the Earth's radius of several thousand kilometers.
# Now Let's Run Al-Biruni's Method in Python
For the experiment, we use these training inputs:
d
Distance between the two observation points
300 meters
α
Angle from the near point
40 degrees
β
Angle from the far point
25 degrees
δ
Horizon dip angle from the summit
34.18 arcminutes
Every degree has 60 arcminutes. So the dip angle in this example is less than 0.57 degrees — a very small angle that is not easy to measure precisely.
biruni.py
from math import radians, tan, cos, pi
def mountain_height(distance_m, near_angle_deg, far_angle_deg):
alpha = radians(near_angle_deg)
beta = radians(far_angle_deg)
return (
distance_m * tan(alpha) * tan(beta)
/ (tan(alpha) - tan(beta))
)
def earth_radius(height_m, dip_arcminutes):
delta_deg = dip_arcminutes / 60
delta = radians(delta_deg)
height_km = height_m / 1000
return height_km * cos(delta) / (1 - cos(delta))
distance = 300
near_angle = 40
far_angle = 25
dip = 34.18
height = mountain_height(distance, near_angle, far_angle)
radius = earth_radius(height, dip)
circumference = 2 * pi * radius
print(f"Mountain height: {height:.2f} m")
print(f"Earth radius: {radius:.2f} km")
print(f"Earth circumference: {circumference:.2f} km")
Output:
output
Mountain height: 314.88 m
Earth radius: 6370.25 km
Earth circumference: 40025.47 km
The Earth's mean radius is about 6371 km, and our calculation reached 6370.25 km. Of course, the inputs in this example were chosen just to test the code — they are not Al-Biruni's actual observation data.
Various sources report Al-Biruni's result as roughly 6339.6 km. That number is remarkably close to the modern value; still, the conversion of historical units and the true precision of his instruments remain topics of discussion among researchers.
# Why Do Hundredths of an Arcminute Matter?
In the radius formula, the term
1 − cos(δ) is very small. That's why even a tiny change in the angle can shift the result by tens of kilometers. For example:
sensitivity.txt
angle 34.00 arcmin → radius 6437.88 km
angle 34.18 arcmin → radius 6370.25 km
angle 34.50 arcmin → radius 6252.62 km
So the hardest part of the job wasn't the formula — it was measuring that tiny angle accurately. Ground irregularities, errors in the mountain's computed height, and atmospheric refraction can all shift the apparent position of the horizon. The Earth itself isn't a perfect sphere either; it's slightly wider at the equator.
Key point: The Python output being close to the modern value doesn't mean the old instruments had the same precision. The result mainly shows that Al-Biruni's geometric idea was correct.
# What Was Al-Biruni's Real Genius?
Al-Biruni wasn't the first to know the Earth is spherical, nor did he perform the first measurement of the Earth. His important contribution was reducing a very large problem to a few simple measurements in a single region:
1
Two angles from the foot → mountain height
2
One angle from the summit → Earth's radius
3
Radius × 2π → circumference
Al-Biruni couldn't see the Earth from the outside, but he didn't need such a view. A mountain, a horizon line, and a few trigonometric relations were enough to carry out the computation.
# One Mountain, Three Angles, and the Size of the Earth
The most fascinating part of this story isn't only how close the number is to the modern value. The more important point is that Al-Biruni realized measuring the Earth doesn't require traveling around it; it's enough to measure the height of one mountain and the dip of the horizon with care.
Today Python performs this computation in a fraction of a second, but the core idea is the same one Al-Biruni found about a thousand years ago by looking at a mountain and the horizon line.
takeaway.txt
Al-Biruni never saw the Earth from the outside;
yet he realized the curvature of the horizon is itself a ruler.
Know how high you stand and where the horizon sits —
and the size of the entire Earth follows from those two numbers.
yet he realized the curvature of the horizon is itself a ruler.
Know how high you stand and where the horizon sits —
and the size of the entire Earth follows from those two numbers.
