Vector Bearing Inputs
Large screens show three columns, smaller screens show two, and phones show one.
Example Data Table
| Start X | Start Y | End X | End Y | Δx | Δy | Distance | True Bearing | Quadrant Bearing | Magnetic Bearing |
|---|---|---|---|---|---|---|---|---|---|
| 200.000 | 120.000 | 310.000 | 260.000 | 110.000 | 140.000 | 178.045 | 38.157° | N 38.16° E | 35.657° |
Sample path: from (200, 120) to (310, 260) with a 40° reference bearing, 2.5° declination, and 5° tolerance.
Formula Used
1) Vector components
Δx = x₂ − x₁ and Δy = y₂ − y₁
2) Distance
Distance = √(Δx² + Δy²)
3) True bearing from north
True Bearing = mod(atan2(Δx, Δy) × 180 / π, 360)
4) Reverse bearing
Reverse Bearing = mod(True Bearing + 180, 360)
5) Magnetic bearing
Magnetic Bearing = mod(True Bearing − Declination, 360)
6) Unit vector
u = <Δx / Distance, Δy / Distance>
7) Heading error
Heading Error = wrapped angular difference between calculated bearing and reference bearing in the range −180° to +180°.
How to Use This Calculator
Step 1
Enter the start coordinate and the end coordinate. X is treated as east-west, and Y is treated as north-south.
Step 2
Optionally enter a reference bearing if you want the calculator to measure heading error and show whether the path stays within tolerance.
Step 3
Enter magnetic declination. Use positive values for east declination and negative values for west declination.
Step 4
Set the decimal precision and unit label. Then press the calculate button.
Step 5
Review the result cards, the quadrant bearing, and the Plotly graph. Export the current report as CSV or PDF when needed.
Frequently Asked Questions
1) What does a vector bearing measure?
It measures the direction from a start point to an end point. This page reports that direction as a true bearing, quadrant bearing, compass point, and angle from the positive X axis.
2) Why is atan2 used here?
atan2 handles all four quadrants correctly. It keeps the sign of both coordinate changes, so the final bearing remains valid whether the vector points northeast, southeast, southwest, or northwest.
3) What is the difference between bearing and angle from the X axis?
Bearing is measured clockwise from north. The X-axis angle is measured counterclockwise from the positive X direction. Both describe the same vector, but they use different reference axes.
4) What is a reverse bearing?
A reverse bearing points in the exact opposite direction. It is found by adding 180 degrees and wrapping the result into the 0 to 360 degree range.
5) How is magnetic bearing calculated?
This calculator subtracts magnetic declination from the true bearing. Enter east declination as positive and west declination as negative to keep the conversion consistent.
6) What happens when the two points are identical?
The vector length becomes zero, so direction is undefined. The calculator blocks that case and asks for different coordinates.
7) Why is a tolerance field useful?
Tolerance helps compare the calculated bearing against a planned or target heading. It is useful in surveying, mapping, robotics, route control, and navigation checking.
8) Can I use this for map grids or screen coordinates?
Yes. As long as X and Y are consistent, the tool works for grid coordinates, pixel positions, local maps, engineering layouts, and other two-dimensional coordinate systems.