Calculate great-circle distance and beam heading between two Maidenhead grid squares, plus long path, back bearing, and grid to latitude-longitude conversion.
Maidenhead Grid Distance & Bearing Formula
The calculator first decodes each Maidenhead locator into the latitude and longitude of its square center. A field (2 characters) spans 10° of latitude by 20° of longitude, a square (4 characters) spans 1° by 2°, a subsquare (6 characters) spans 2.5 minutes by 5 minutes, and an extended square (8 characters) spans 15 seconds by 30 seconds. With both centers known, the short-path distance comes from the haversine formula:
d = 2 * R * asin( sqrt( sin^2((lat2 - lat1)/2) + cos(lat1) * cos(lat2) * sin^2((lon2 - lon1)/2) ) )
The initial bearing, which is the beam heading you rotate your antenna to, comes from:
brg = atan2( sin(lon2 - lon1) * cos(lat2) , cos(lat1) * sin(lat2) - sin(lat1) * cos(lat2) * cos(lon2 - lon1) )
The long-path results go the opposite way around the globe:
d_long = 2 * pi * R - d ; brg_long = (brg + 180) mod 360
Variables:
- d is the short-path (great circle) distance in kilometers
- R is the Earth mean radius, 6371.0088 km
- lat1, lon1 and lat2, lon2 are the coordinates of the two square centers in radians, with north latitude and east longitude positive
- brg is the initial bearing from station 1 to station 2 in degrees, measured clockwise from true north
- d_long and brg_long are the long-path distance and bearing
The default mode applies all three formulas between two locators and also reports the back bearing (the same bearing formula evaluated from the remote end), the midpoint of the path encoded as a 6-character grid square, and the distance in kilometers, statute miles, and nautical miles. The two converter modes run the decoding step on its own: one turns a locator into the coordinates of its center, and the other encodes a latitude and longitude into a 4, 6, or 8 character locator and shows how far your exact point sits from that square center. All bearings are true, so add or subtract your local magnetic declination before setting a compass heading.
Locator Precision and Distance Accuracy
A locator names an area rather than an exact station position. The table gives approximate local cell dimensions and offsets at 45° latitude; these are not global worst-case bounds. East–west dimensions grow toward the equator and shrink toward the poles. Larger cells also make a flat local approximation less accurate.
| Locator length | Cell size (lat x lon) | Size at 45° latitude | Approx. center offset at 45° | Approx. combined offset at 45° |
|---|---|---|---|---|
| 2 (field, FN) | 10° x 20° | 1,112 km x 1,573 km | about 963 km | up to about 1,930 km |
| 4 (square, FN31) | 1° x 2° | 111 km x 157 km | about 96 km | up to about 193 km |
| 6 (subsquare, FN31pr) | 2.5′ x 5′ | 4.6 km x 6.6 km | about 4.0 km | up to about 8 km |
| 8 (extended, FN31pr21) | 15″ x 30″ | 0.46 km x 0.66 km | about 0.40 km | up to about 0.8 km |
The practical reading: a 4-character exchange is fine for casual HF logging, but a distance-scored VHF contest or a distance record claim can move by nearly 200 km depending on where each station sits in its square, so use 6 characters there. Microwave dish alignment and EME work justify 8 characters. The second table gives reference results between well-known squares, computed with the same formulas the calculator uses, so you can also use it to spot-check any grid tool.
| Path | Short-path distance | Initial bearing |
|---|---|---|
| FN31pr to IO91wm (Connecticut to London) | 5,414.7 km / 3,364.6 mi | 52.2° (NE) |
| FN31pr to CN87ts (Connecticut to Seattle) | 3,910.1 km / 2,429.6 mi | 297.2° (WNW) |
| CN87ts to PM95vq (Seattle to Tokyo) | 7,678.0 km / 4,770.9 mi | 300.5° (WNW) |
| IO91wm to QF56od (London to Sydney) | 16,991.8 km / 10,558.2 mi (long path 23,038.5 km at 240.7°) | 60.7° (ENE) |
Example Problems
Example 1: Distance and beam heading between two 6-character locators.
Your station is in FN31pr and the remote station is in IO91wm. Decoding the locators gives centers of 41.729167, -72.708333 for FN31pr and 51.520833, -0.125 for IO91wm. Converting to radians and applying the haversine formula with R = 6371.0088 km:
d = 2 * 6371.0088 * asin(sqrt(sin^2(0.170897/2) + cos(0.728311) * cos(0.899208) * sin^2(1.266818/2))) = 5,414.7 km, which is 3,364.6 miles.
The bearing formula returns 52.2°, so you aim the beam northeast. The long path is 40,030.2 – 5,414.7 = 34,615.5 km at a heading of 52.2 + 180 = 232.2°.
Example 2: Convert a latitude and longitude to a 6-character locator.
A station sits at 41.7148, -72.7272. Add 180 to the longitude to get 107.2728: dividing by 20 gives field letter F (index 5), the 7.2728 remainder divided by 2 gives square digit 3, and the 1.2728 remainder times 12 gives subsquare letter p (index 15). Add 90 to the latitude to get 131.7148: dividing by 10 gives field letter N (index 13), the 1.7148 remainder gives square digit 1, and the 0.7148 remainder times 24 gives subsquare letter r (index 17). Interleaving longitude and latitude characters produces FN31pr. The center of that subsquare is 41.7292, -72.7083, which is 2.24 km from the exact point entered.
Frequently Asked Questions
How many characters should I enter for an accurate distance?
Longer locators reduce cell size. The table’s approximate combined offsets apply at 45° latitude; they are not universal error guarantees. Follow the precision and Earth-model rules required by the relevant contest or award. Mixed lengths are supported; this calculator uses each cell center.
Why does the bearing look wrong compared to a flat map?
A spherical great-circle path can appear curved on a flat map. Actual radio propagation can differ from this geometric model. From Seattle (CN87ts) the heading to Tokyo (PM95vq) is 300.5°, west-northwest, even though Tokyo sits at a lower latitude, because the shortest route arcs up near the Aleutians. The value shown is also only the initial bearing; the heading a signal follows changes continuously along the path, which is why the back bearing is generally not the outbound bearing plus 180°.
When should I use the long-path bearing?
The long-path heading describes the complementary spherical arc, with distance 40,030.2 km minus the short arc. This calculator does not predict whether that radio path is open, signal strength, or propagation delay. At coincident or antipodal centers no unique heading exists; at antipodes the midpoint is also nonunique.
