Free calculator

Inverse and forward COGO

The two operations every COGO session is made of, plus the intersections.

Everything is computed in your browser. Nothing you type is uploaded, stored, or logged.

Inverse — two points to a distance and a direction

Northing first, easting second — the order a plat, a data collector and a State Plane publication all use, and the reverse of the (x, y) order a maths library expects.

Distance
500.00 ft
Azimuth
36°52′11.63″
Azimuth (decimal)
36.869898°
Bearing
N 36°52′11.63″ E
Back azimuth
216°52′11.63″
ΔN (latitude)
400.00 ft
ΔE (departure)
300.00 ft

Computed as atan2(ΔE, ΔN), which is the surveying convention. With the arguments the other way round — atan2(ΔN, ΔE), the mathematical convention — the same two points would give 53°07′48.37″, which is the reflection of the true direction about the 45° line and is wrong for every course that is not exactly north-east.

Forward — a point, a direction and a distance

Bearing (N 45-00-00 E) or azimuth (45-00-00)

N₂ = N₁ + D·cos α and E₂ = E₁ + D·sin α, with α the azimuth clockwise from north. Cosine goes with the northing; the check is that an azimuth of 90° must move the easting by the whole distance and leave the northing alone.

Northing
5,176.78
Easting
5,176.78
Azimuth used
45°00′00.00″
Coordinates
N 5,176.78, E 5,176.78 ft

Three-dimensional inverse and slope reduction

The elevations below attach to the two points in the inverse panel above, so the horizontal distance is the same one computed there.

Slope reduction

90° is level; less than 90° looks uphill

A total station measures a slope distance and a zenith angle. Horizontal is S·sin z and the vertical component is S·cos z. A vertical angle is the same information measured from the horizon instead: z = 90° − vertical angle.

Slope distance
500.90 ft
Horizontal distance
500.00 ft
ΔElevation
30.000 ft
Vertical angle
3°26′01.07″
Zenith angle
86°33′58.93″
Grade
+6.00%

Slope reduction

Horizontal component
249.91 ft
Vertical component
6.544 ft
Zenith angle used
88°30′00.00″
Vertical angle
1°30′00.00″

Direction–direction intersection

Two lines of known direction from two known points cross at one place, unless the directions are parallel. The solution is an intersection of infinite lines, so it can land behind either instrument — check the computed point against the sketch before staking it.

Northing
5,300.00
Easting
5,300.00
Coordinates
N 5,300.00, E 5,300.00 ft

Distance–distance intersection

Two circles cross at two points, and the arithmetic cannot tell you which one you measured. Both are given below, labelled by which side of the point 1 → point 2 line they fall on. The field note picks the answer, not the calculator.

Solution A — left of P1 → P2
N 5,400.00, E 5,300.00 ft
Solution B — right of P1 → P2
N 4,600.00, E 5,300.00 ft
Azimuth P1 → P2
90°00′00.00″
Both solutions, with the check distances back to each control point
SolutionNorthingEastingAzimuth from P1Azimuth from P2
A — left5,400.005,300.0036°52′12″323°07′48″
B — right4,600.005,300.00143°07′48″216°52′12″

Station and offset

Bearing or azimuth — the direction of travel

Sign convention: a POSITIVE offset is to the RIGHT of the direction of travel, a negative offset to the LEFT. Station is measured along the line from the line point, and a negative station means the target falls behind it.

Station
2+12.13
Station (distance along)
212.13 ft
Offset
212.13 ft RIGHT
Line azimuth
45°00′00.00″

Coordinate geometry is two operations. The inverse turns a pair of coordinates into the distance and direction between them; the forward turns a point, a direction and a distance into a new pair of coordinates. Every traverse, every layout sheet and every intersection problem is those two run in some order, so it is worth being exact about the conventions they run under.

Northing first

A survey coordinate is written northing first, easting second — on a plat, in a data collector, in a State Plane publication. Plotting libraries and most maths textbooks take the opposite order, x then y, which is why coordinate pairs get transposed at the boundary between survey code and drawing code. A transposed pair mirrors the parcel across the north-east diagonal: every distance and the area are still correct, and every bearing is wrong.

Why the inverse uses atan2(ΔE, ΔN)

The azimuth in plane surveying is measured clockwise from north. The mathematical convention measures angles counter-clockwise from the positive x axis. The two run in opposite directions from different origins, and the conversion between them is a reflection, not a rotation — which is why you cannot fix a swapped inverse by adding a constant.

distance = √(ΔN² + ΔE²) azimuth = atan2(ΔE, ΔN) easting first
ΔN = N₂ − N₁ and ΔE = E₂ − E₁. The argument order is the whole trick.

The default points on this page are a 3-4-5 triangle scaled by a hundred: ΔN = 400 ft north and ΔE = 300 ft east, so the distance is exactly 500 ft. Because the course runs further north than east, its azimuth has to be less than 45°, and atan2(300, 400) duly gives 36°52′11.63″. Feed the same numbers to atan2 in the mathematical order and you get atan2(400, 300) = 53°07′48.37″, which is the complement — the reflection of the true direction about the 45° line. The two agree only on a course running exactly north-east, which is how a swapped inverse survives a casual test.

The forward computation

The forward is the inverse run backwards, and it carries the same convention.

N₂ = N₁ + D · cos α E₂ = E₁ + D · sin α
α is the azimuth clockwise from north. Cosine goes with the northing.

Cosine with the northing follows from the azimuth being measured from north rather than from east. At α = 0° the course is due north: cos 0° = 1 puts the whole distance into the northing and sin 0° = 0 leaves the easting alone. At α = 90° the roles reverse. Swapping the two functions is right on both cardinal cases and wrong everywhere between, which is how the error hides.

Slope distance, zenith angle and vertical angle

A total station does not measure a horizontal distance. It measures a slope distance along the line of sight and an angle in the vertical plane, and the horizontal distance is computed from the two. Which angle it reports depends on how the instrument is configured, and the difference matters.

horizontal = S · sin z vertical = S · cos z z = 90° − vertical angle
z is the zenith angle, measured down from straight up. A vertical angle is measured from the horizon.

A zenith angle of 90° is a level sight. Below 90° the sight goes uphill; above 90° it goes downhill. A vertical angle measures the same geometry from the horizontal instead, so it is zero on a level sight, positive uphill and negative downhill. Entering a vertical angle where the calculator wants a zenith angle produces a horizontal distance that is nearly the whole vertical component, which on a steep sight is off by a factor of ten rather than by a rounding error.

The three-dimensional inverse runs the same relationship the other way: two points with elevations give the slope distance, the vertical and zenith angles, and the grade. Grade is the vertical component over the horizontal, not over the slope distance — invisible at 2% and worth about half a percent at 10%.

Intersections, and why one of them has two answers

A direction–direction intersection is the crossing of two straight lines. Two lines cross once, or never if they are parallel, so the answer is unique. What the arithmetic will not tell you is whether the crossing lies in front of the instruments or behind them: a point 900 ft behind an occupied station is a valid answer to the equation and a useless answer to the survey.

A distance–distance intersection is the crossing of two circles, and two circles that cross at all cross at two points, one on each side of the line joining their centers. This is not a defect in the method. Two taped distances genuinely do not determine which side of the base line the point is on — the same two measurements would have been obtained from the mirror-image point.

  • The calculator returns both solutions, ordered so the first lies to the LEFT of the point 1 → point 2 line and the second to the right.
  • The field note picks between them: a sketch, an approximate bearing, a note that the corner is north of the road, or a third rough measurement to any other known point.
  • If the two solutions are nearly the same point, the geometry is weak — the circles are meeting almost tangentially and a small error in either distance swings the answer a long way along the base line.
  • The two error states are geometric, not numerical: radii too short to reach each other, or one circle wholly inside the other. Both mean at least one distance is wrong.

Station and offset

Station and offset resolves a point into two numbers relative to a line: how far along, and how far to the side. It is the form a construction stake is written in and the form an as-built is checked in.

along = ΔN · cos α + ΔE · sin α offset = −ΔN · sin α + ΔE · cos α
A rotation of the coordinate differences into the line's own frame.

The sign convention used here — and on almost every set of stakes in the United States — is that a positive offset is to the RIGHT of the direction of travel and a negative offset to the left. Right of travel, not right of the drawing: if the alignment is running north on the plan sheet then right is east, and if it turns and runs south then right is west. That is why an offset written on a stake is meaningless without the station and the direction of increasing station alongside it.

Questions

Can I type a bearing instead of an azimuth?

Yes, in every direction field on the page. An entry that begins with N or S and ends with E or W is read as a quadrant bearing; a bare angle is read as an azimuth clockwise from north. Degrees, minutes and seconds can be separated by hyphens, spaces, colons or the ° ′ ″ marks.

Why does the distance–distance intersection give me two points?

Because two circles that intersect do so at two points, and two measured distances genuinely do not say which one you occupied. The mirror-image point across the line joining the two control points would have produced exactly the same pair of measurements. Choosing between them takes information from the field — a sketch, an approximate direction, or a third measurement.

Is the distance an inverse gives me a ground distance or a grid distance?

Whatever the coordinates are. Inversing State Plane coordinates gives a grid distance, which is shorter or longer than the distance you would tape on the ground by the combined factor. Convert with the scale-factor calculator before comparing an inversed distance against a field measurement.

What is the difference between a zenith angle and a vertical angle?

They measure the same sight from different origins. A zenith angle is measured down from straight up, so a level sight is 90°. A vertical angle is measured from the horizon, so a level sight is 0° and uphill is positive. The conversion is z = 90° − vertical angle. Entering one where the other is expected produces a badly wrong horizontal distance on any steep sight.

Does the direction–direction intersection check that the point is in front of the instrument?

No. It solves for the crossing of two infinite lines, so a solution behind either point is returned without comment. Compare the computed coordinates against the sketch before you stake anything; a valid solve is not the same as a sensible one.

Is anything I type sent anywhere?

No. Every computation on this page runs in your browser. Nothing is uploaded, logged or stored, and the page keeps working with no network connection once it has loaded.

Sources

  • Washington State DOT, Highway Surveying Manual M 22-97, Chapter 11 — published state manual; the azimuth, bearing and station-and-offset conventions used here
  • Montana DOT, Survey Manual, Appendix C — published state manual; coordinate geometry and slope-reduction practice
  • NOAA National Geodetic Survey publications — public domain; State Plane coordinate definitions and the grid-versus-ground distinction

Other calculators

All 10