How Far to Tokyo?
The problem
Two points on Earth’s surface, given in latitude and longitude:
- London: 51.5074° N, 0.1278° W
- Tokyo: 35.6895° N, 139.6917° E
Treating the Earth as a sphere of radius 6371 km, find the great-circle distance between them to the nearest kilometre, using the spherical law of cosines:
d = R · acos( sin(lat1)·sin(lat2)
+ cos(lat1)·cos(lat2)·cos(lon2 − lon1) )
Notes
- It’s just trig underneath — any scientific calculator handles it, no navigation module needed. (The HP-41C’s real Aviation Pac doesn’t actually have a great-circle-from-coordinates function, in case you were about to go looking — it’s built around flight-planning tasks like fuel/time, wind correction, and VOR fixes, where you supply the course and distance rather than compute it.)
- London’s longitude is west, so it is negative: lon2 − lon1 = 139.6917 − (−0.1278) = 139.8195.
- Mind your angle mode. It is the usual way to get a wrong answer here.
Hint
Click for a hint
Everything inside the acos is in degrees, so do that part in DEG. But the acos itself comes
back as an angle, and the arc-length formula d = R · θ needs that angle in radians.
The tidy trick on an RPN machine: leave the calculator in DEG for all the sines and cosines, then
switch it to RAD just before taking the arccos. The arccos then comes out in radians already and
you can multiply by 6371 directly — no × π ÷ 180 step at all.
Solution
Click to reveal the solution
Spherical law of cosines, giving the central angle θ between the two points:
cos(θ) = sin(lat1)·sin(lat2) + cos(lat1)·cos(lat2)·cos(lon2 − lon1)
Arc length from the central angle (θ must be in radians here):
d = R · θ
Answer: 9,559 km
Calculator solutions
HP-42S
Set DEG (MODES menu → DEG), then:
51.5074 COS
35.6895 COS
× cos(lat1)·cos(lat2)
139.6917 ENTER 0.1278 + the longitude difference, 139.8195
COS
×
51.5074 SIN
35.6895 SIN
×
+ the whole argument of the arccos
Now switch to RAD (MODES menu → RAD) and finish:
ACOS 85.9635775…° becomes 1.50034746… rad
6371 ×
Display: 9558.7137
Elektronika MK-61
The angle mode is the physical Р-ГРД-Г slide switch. Start with it on Г (degrees).
sin is F 7, cos is F 8, arccos is F 5.
51.5074 F 8
35.6895 F 8
×
139.8195 F 8
×
51.5074 F 7
35.6895 F 7
×
+
Now slide the switch to Р (radians), then:
F 5 arccos, in radians
6371 ×
Display: 9558.7132
The MK-61 carries eight significant digits, so its last digit sits a little off the HP-42S’s 9558.7137. Both round to 9559 km.
HP-15C
Identical method. On the 15C, DEG is g 7, RAD is g 8, and COS⁻¹ is g COS.
g 7 DEG
51.5074 COS
35.6895 COS
×
139.6917 ENTER 0.1278 +
COS
×
51.5074 SIN
35.6895 SIN
×
+
g 8 RAD
g COS COS⁻¹, in radians
6371 ×
Result: ≈ 9558.7137 (in f 4, four decimal places) → 9559 km.
HP-41C
ASIN/ACOS/ATAN are built in on every 41C — no module needed.
DEG
51.5074 COS
35.6895 COS
×
139.6917 ENTER 0.1278 +
COS
×
51.5074 SIN
35.6895 SIN
×
+
RAD
ACOS 85.9635775…° becomes 1.50034746… rad
6371 ×
Display (in FIX 4): 9558.7137 → 9559 km.
HP-48GX
RPL keeps RPN’s stack, ENTER, and postfix functions, so the same keystroke sequence as the
41C/42S works unchanged. SIN and COS are unshifted keys and ACOS is ← COS; DEG and
RAD are not keys at all on this machine — type them as command names on the alpha keyboard (α
before each letter), or set the mode from the MODES menu.
One genuine RPL difference worth knowing: you can also key the whole formula in as a single
algebraic object (put it in ' ' quotes and hit EVAL) instead of stepping through the stack —
but that object evaluates in one pass under whatever the current angle mode is at that moment, so
it can’t switch DEG mid-expression to RAD for just the ACOS step. The mode-switching trick
that avoids an explicit × π ÷ 180 only works with sequential stack entry:
DEG
51.5074 COS
35.6895 COS
×
139.6917 ENTER 0.1278 +
COS
×
51.5074 SIN
35.6895 SIN
×
+
RAD
ACOS
6371 ×
Result: 9558.71369499 → 9559 km, matching the HP-42S value to eleven significant digits; the tail is the 48’s real twelve-digit BCD arithmetic.
TI-84
The TI is algebraic, so the mode-switching trick doesn’t fit as neatly; stay in Degree mode
(MODE → Degree) and convert at the end. cos⁻¹ is 2nd COS, and π is 2nd ^.
6371cos⁻¹(sin(51.5074)sin(35.6895)+cos(51.5074)cos(35.6895)cos(139.8195))π/180
Result: ≈ 9558.7137 → 9559 km.
Casio fx-991
Same single expression as the TI-84. Set Degree mode first: on a ClassWiz (fx-991EX/CW) that is
SHIFT MENU → Angle Unit → Degree; on an older fx-991ES it is SHIFT MODE → Degree.
6371 × cos⁻¹(sin(51.5074)sin(35.6895)+cos(51.5074)cos(35.6895)cos(139.8195)) × π ÷ 180
Result: ≈ 9558.7137 → 9559 km.
Solvable on: HP-42S, HP-15C, HP-41C, HP-48GX, Elektronika MK-61, TI-84, Casio fx-991