Introduction to plotting a chest from a grid chart
A treasure chart is a joke about a serious problem. Somebody drew a grid on a piece of paper, wrote a scale in the corner, marked where the ship lies and where the chest lies, and then expected the reader to work out how far it is and which way to steer. That is exactly what a navigator does with a real harbour plan, and it is what this calculator does here. You give it two grid positions and the scale of one grid square, and it returns the length of the leg and the course to steer, expressed both as a true bearing and as the magnetic bearing you would actually hold on a compass card.
The theme is playful; the units are not. Every conversion on this page is anchored to a published definition. The international nautical mile is exactly 1852 metres, a value agreed at the First International Extraordinary Hydrographic Conference in Monaco in 1929 and adopted in the United States on 1 July 1954. A fathom is exactly six international feet, so exactly 1.8288 metres. A point of the compass is exactly one thirty-second of a circle, so exactly 11.25 degrees. Those are the numbers this page uses, and the closing section names the documents they come from. Where a unit genuinely has no single agreed value, such as the league or the pace, the page says so instead of quietly picking one.
The calculator is useful precisely because a chart hides its diagonals. If the chest is twelve squares east and sixteen squares north, the run is not twenty-eight squares and it is not sixteen; it is exactly twenty, because the leg is the hypotenuse of a right triangle. Add a scale of half a nautical mile to the square and that becomes ten nautical miles, or 18.52 kilometres, or a little over 10 126 fathoms of lead line. Getting from the first number to the last is four multiplications, each of which is easy to fumble by a factor of two, which is why it is worth having them all laid out at once.
The one rule the inputs must obey is consistency. Both positions must be counted from the same origin, on the same grid, with the same square size on both axes. If the ship is measured from the beacon and the chest from the jetty you are mixing two coordinate frames and the answer is meaningless, however tidy it looks. Negative coordinates are perfectly legal: a point at (-3, 4) is three squares west of the origin and four squares north of it, and the arithmetic handles that without special cases because the squaring step removes the sign.
The sea units on this page, and what actually defines them
Sea distance is a museum of half-retired units, and several of them are ambiguous in ways that matter. The table below lists what this page converts to, the exact value it uses in metres, and how firm that value really is. Exact entries are exact by definition, not rounded.
Three of those rows deserve a warning. The cable is the worst offender: Bowditch tabulates a cable of 720 feet, which is 219.456 metres, and immediately below it a British cable of exactly one tenth of a nautical mile, which is 185.2 metres. They differ by nearly nineteen per cent and share a name, so this page prints both rather than choosing. The league is nearly as bad. NIST Handbook 44 lists only the land league of 15840 feet; the three-nautical-mile sea league is a convention, and the International Hydrographic Review notes that historical leagues ranged from roughly 2.4 to 4.6 nautical miles depending on country and century. The pace is worse still, and is handled below.
The pace has no standards definition at all, which is why this calculator refuses to invent one and asks you for a stride length instead. A comfortable modern single pace is somewhere near 0.75 metres. The Roman passus was a double step of five Roman feet and is usually reconstructed at roughly 1.48 metres, but that figure comes from archaeology rather than from a standards document and this page does not present it as sourced. Since the two readings differ by a factor of two, "forty paces from the crooked palm" is an instruction that can be wrong by an entire chest width unless everybody agrees on whose legs are being used.
How to use the chart scale, variation and pace fields
Start with the four coordinates. Enter the ship at (x1, y1) and the chest at (x2, y2), counted in grid squares from whatever origin your chart uses, with x increasing to the east and y increasing to the north. The calculator never needs to know where the origin is, only that both points share it.
Next set the chart scale. Enter how much real distance one grid square represents and pick the unit from the list. A drawn treasure map might use one square to the cable; a harbour plan might use one square to 100 metres; a fantasy ocean chart might use one square to the sea league. The scale must be strictly positive, and the calculator rejects zero and negative scales rather than returning an infinite or mirrored answer.
Then set the magnetic variation, which is the angle between true north and magnetic north at your position, positive when magnetic north lies east of true north. If you are plotting a real place, look the figure up in the NOAA NCEI World Magnetic Model, which is the authoritative source and is revised every five years because the field drifts. If you are plotting a fictional island, leave it at zero and the magnetic and true bearings will simply agree. Finally, set your pace length in metres if you want the pace row of the result to mean anything.
Press Calculate. The result panel gives the leg in grid squares, the same leg in every unit in the table above, the true bearing in degrees, the nearest whole compass point with its Bowditch name, the magnetic bearing, and the reciprocal course for the run home. Below the panel, the chart plot draws the leg against a compass rose so you can sanity-check the quadrant at a glance: if the plot shows the chest to the southwest and the panel says the bearing is 040, one of your coordinates has a sign error. Copy chart link puts the whole state into the address bar so a crewmate can open the identical plot.
The distance and bearing formula for a plane chart
The page first computes the change in the horizontal direction and the change in the vertical direction, shown in the result panel as ΔX and ΔY. Once those two differences are known, the leg in grid squares comes from the Pythagorean theorem:
Squaring matters because it turns a westward difference and an eastward difference into the same positive contribution. A chest eight squares west is eight squares away horizontally even though its ΔX is negative. The leg is always at least as long as the larger of the two absolute differences and never longer than their sum, which is a fast sanity check: if ΔX is 6 and ΔY is 8, the answer must lie between 8 and 14, and in fact it is exactly 10.
Grid squares become real distance by one multiplication. If one square is worth s metres, the leg in metres is:
and the leg in any other length unit is that metre figure divided by the defining constant of the unit. Writing k(u) for the number of metres in one unit u, taken from the table above:
Because every constant in that table is exact, the round trip is exact too. Convert ten nautical miles to fathoms and back and you get ten nautical miles again, to the last digit the browser can hold. This page performs every conversion through metres for exactly that reason: converting fathoms to cables directly would compound two roundings, while going by way of the metre uses two exact constants.
The course to steer is the second half of the answer, and it is not a Pythagorean question. Bearings are measured clockwise from north, so the arguments to the arctangent are the other way round from the usual mathematical convention, and the result has to be wrapped into a single turn of the circle:
The two-argument arctangent is what keeps the quadrants straight. A single-argument arctangent of ΔX divided by ΔY would give 45 degrees for a chest to the northeast and the same 45 degrees for a chest to the southwest, because both ratios are positive. Adding 360 before taking the remainder is what stops a westerly leg from being reported as a negative bearing: due west comes out of the arctangent as -90 and must be printed as 270.
Magnetic bearing follows from variation. If magnetic north lies V degrees east of true north, then a course expressed against the magnetic meridian is smaller than the same course expressed against the true meridian by that amount, which is the old rule that you subtract easterly variation when going from true to magnetic:
Finally the bearing is named. A point is one thirty-second of a circle, and the nearest whole point is found by dividing and rounding, with a wrap so that a bearing of 358 degrees names North rather than falling off the end of the table:
Worked example: twelve squares east and sixteen north
Take a chart of Skeleton Bay drawn at half a nautical mile to the square. The ship lies at (4, 3) and the chest is marked at (16, 19). Magnetic variation at that position and epoch is 12.5 degrees west, which is entered as -12.5. Stride length is left at 0.75 metres.
ΔX is 16 - 4 = 12 squares and ΔY is 19 - 3 = 16 squares. The leg is the square root of 144 + 256, which is the square root of 400, which is exactly 20 squares. It is the familiar 3-4-5 triangle scaled by four, so the answer is clean rather than approximate.
At half a nautical mile to the square, 20 squares is 10 nautical miles, which is 10 × 1852 = 18 520 metres exactly. Dividing that by the constants in the table gives 18.52 kilometres, 11.5078 statute miles, 100 cables in the chart sense, 84.39 cables' lengths in the US sense, 10 126.86 fathoms, 3.3333 sea leagues, 3.8358 land leagues, and 24 693 paces at three-quarters of a metre each. That last figure is the one to distrust, because it depends entirely on the stride you entered.
The bearing is atan2(12, 16), which is 36.8699 degrees, so the true course is 037. Dividing by 11.25 gives 3.277, which rounds to point 3, and point 3 in Bowditch's table is NE by N at 33.75 degrees. The magnetic bearing is 36.8699 - (-12.5) = 49.3699, so you would steer 049 on the card while making good a true 037. The reciprocal for the voyage home is 36.8699 + 180 = 216.8699, or 217 true.
The lesson buried in that arithmetic is that the same leg has four legitimate-looking angle numbers attached to it: 36.87 true, 49.37 magnetic, 33.75 as the nearest named point, and 216.87 for the return. Confusing any two of them is how a boat ends up on a reef, and it is why the result panel labels all four rather than printing a single bearing.
Reading the result panel and the plotted chart
Read the panel as three groups. The geometry group gives ΔX, ΔY and the leg in grid squares, and is the part you check against the chart with dividers. The distance group repeats that single leg in every unit; the numbers are all the same distance, so if one of them looks wrong they are all wrong, and the cause is almost always the scale field rather than the conversion. The bearing group gives the true course, the nearest named point, the magnetic course and the reciprocal.
The plot underneath is not decoration. It rescales itself to fit both marks, draws the leg, and shows a compass rose with a solid true-north arrow and a dashed magnetic-north arrow separated by the variation you entered. When variation is zero the two arrows coincide. Use the plot to check the quadrant: if the chest is drawn up and to the right the bearing must be between 000 and 090, and any panel figure outside that range means a coordinate has been mistyped or the axes have been swapped.
When ΔX and ΔY are both zero the panel does not print a bearing at all. That is deliberate. The arctangent of zero over zero is not a direction, and a calculator that quietly printed 000 would be claiming the chest lies due north when in fact you are standing on it. The panel says so in words instead.
Limitations of a flat chart, and where the model stops being true
Everything on this page assumes a plane. That assumption is excellent for a drawn treasure map, good for a harbour plan, defensible for a few tens of nautical miles, and wrong for an ocean passage. On a sphere the shortest path is a great circle, whose initial bearing changes continuously along the track, and a constant-bearing rhumb line is a longer spiral. Neither is computed here. If your two points are latitudes and longitudes rather than grid squares, this is the wrong tool and you should reach for a great-circle or rhumb-line sailing instead.
- Plane geometry only. No curvature, no convergence of meridians, no chart projection distortion.
- Isotropic grid. One square is assumed to be the same size east-west as it is north-south, which is not true of a Mercator sheet away from its standard parallel.
- Direct leg only. Reefs, shoals, headlands, traffic separation schemes and tacking angles all make the sailed distance longer than the plotted one.
- Static variation. The figure you enter is a snapshot; magnetic variation drifts by a fraction of a degree per year in most places and much faster near the poles.
- Deviation is not modelled. The magnetic bearing here is not a compass bearing, because it takes no account of the iron in your own vessel.
- The pace is yours. Every pace figure inherits whatever stride length you typed, and there is no standard to fall back on.
Two of those deserve emphasis. First, the difference between a magnetic bearing and a compass bearing is deviation, which depends on the ship's own magnetic signature and on her heading, and which is tabulated on a deviation card unique to the vessel. This page stops at magnetic. Second, variation is not a constant of the place: the NOAA NCEI World Magnetic Model is reissued every five years precisely because the field moves, and the current model runs to late 2029. Using a variation figure copied from an old chart is one of the more common ways to end up several degrees off over a long leg.
Sources and standards behind these numbers
Every constant this page uses comes from one of the following primary documents, all of which are free to read:
- NIST Handbook 44, Appendix C, General Tables of Units of Measurement — gives 1 fathom = 6 feet, 1 league = 15 840 feet = 3 miles, 1 cable's length = 720 feet = 120 fathoms, 1 international nautical mile = 1852 metres, and records the Monaco 1929 adoption and the US effective date of 1 July 1954 in footnote 20. NIST Handbook 44, current edition
- NIST Special Publication 447, Weights and Measures Standards of the United States: A Brief History, Appendix 4 — reproduces the 1954 Department of Commerce directive adopting the International Nautical Mile of 1852 metres in place of the US value of 1853.248 metres. NIST SP 447 (PDF)
- NGA Publication No. 9, The American Practical Navigator (Bowditch), Volume II — Appendix B tabulates the 32 compass points at 11.25 degree intervals with their names, Appendix C gives 1 fathom = 1.8288 m, 1 cable = 720 ft = 219.456 m, 1 British cable = 0.1 nautical mile, and 1 nautical mile = 1852 m, and the glossary defines variation, magnetic bearing and true bearing. NGA Maritime Safety Information: American Practical Navigator
- NOAA National Centers for Environmental Information, World Magnetic Model — the authoritative model for magnetic declination, produced with the British Geological Survey; WMM2025 was released in December 2024 and is valid to late 2029. NOAA NCEI World Magnetic Model
- International Hydrographic Organization, International Hydrographic Review, "The nautical mile" — the IHO's own account of the 1929 Monaco value and of how much the league varied historically, from roughly 2.4 to 4.6 nautical miles. IHR: The nautical mile
One value on this page is deliberately not sourced to a standard: the pace. No standards body defines it, the Roman passus figure of about 1.48 metres is an archaeological reconstruction rather than a published standard, and the modern 0.75 metre default is a convenience. That is why the field is editable and why the limitations list flags every pace figure as inheriting your input.
Enter the two grid positions and a chart scale, then press Calculate.
Copy Summary puts the whole result table on the clipboard; Copy chart link puts the inputs into a shareable address.