{"success":true,"version":"v1","request":{"tool":"get_calculator_schema","calculator_id":"compass-bearing"},"result":{"entity_type":"calculator","id":"compass-bearing","calculator_id":"compass-bearing","canonical_url":"https://tttkmbb.com/time/compass-bearing","name":"Compass Bearing Calculator","title":"Compass Bearing Calculator – Initial and Final Bearing Between Two Coordinates with 16-Point Compass Direction","category":"time","category_name":"Time & Geography","tool_name":"calculate_compass_bearing","featured_mcp_tool":false,"description":"Computes the initial (forward) and final bearing of the great-circle route between two latitude/longitude points, the back bearing for the return trip, the matching 16-point compass directions and the distance.","use_when":"You need the heading from one coordinate to another for navigation, antenna or solar alignment, or want a bearing expressed as a compass point such as NNE.","do_not_use_when":"You only need the distance (use haversine-distance) or a bearing relative to magnetic north (apply the local magnetic declination separately).","inputs":[{"name":"lat1","label":"Latitude of start point","type":"number","unit":"°","required":true,"min":-90,"max":90,"description":"Latitude of start point in decimal degrees (north positive, south negative).","example":39.099912},{"name":"lon1","label":"Longitude of start point","type":"number","unit":"°","required":true,"min":-180,"max":180,"description":"Longitude of start point in decimal degrees (east positive, west negative).","example":-94.581213},{"name":"lat2","label":"Latitude of destination","type":"number","unit":"°","required":true,"min":-90,"max":90,"description":"Latitude of destination in decimal degrees (north positive, south negative).","example":38.627089},{"name":"lon2","label":"Longitude of destination","type":"number","unit":"°","required":true,"min":-180,"max":180,"description":"Longitude of destination in decimal degrees (east positive, west negative).","example":-90.200203}],"outputs":[{"name":"initial_bearing_degrees","label":"Initial bearing","type":"number","unit":"°","decimals":2,"description":"Heading at the start point, clockwise from true north (0–360)."},{"name":"initial_compass_point","label":"Initial compass point","type":"string","decimals":4,"description":"16-point compass direction of the initial bearing."},{"name":"final_bearing_degrees","label":"Final bearing","type":"number","unit":"°","decimals":2,"description":"Heading on arrival at the destination."},{"name":"final_compass_point","label":"Final compass point","type":"string","decimals":4,"description":"16-point compass direction of the final bearing."},{"name":"back_bearing_degrees","label":"Back bearing","type":"number","unit":"°","decimals":2,"description":"Initial bearing of the return route (final bearing + 180°)."},{"name":"distance_km","label":"Distance","type":"number","unit":"km","decimals":2,"description":"Great-circle distance (haversine, R = 6371.0088 km)."},{"name":"distance_miles","label":"Distance","type":"number","unit":"mi","decimals":2,"description":"Same distance in statute miles."}],"input_schema":{"type":"object","properties":{"lat1":{"description":"Latitude of start point in decimal degrees (north positive, south negative). Unit: °.","type":"number","minimum":-90,"maximum":90,"examples":[39.099912],"x-unit":"°"},"lon1":{"description":"Longitude of start point in decimal degrees (east positive, west negative). Unit: °.","type":"number","minimum":-180,"maximum":180,"examples":[-94.581213],"x-unit":"°"},"lat2":{"description":"Latitude of destination in decimal degrees (north positive, south negative). Unit: °.","type":"number","minimum":-90,"maximum":90,"examples":[38.627089],"x-unit":"°"},"lon2":{"description":"Longitude of destination in decimal degrees (east positive, west negative). Unit: °.","type":"number","minimum":-180,"maximum":180,"examples":[-90.200203],"x-unit":"°"}},"additionalProperties":false,"required":["lat1","lon1","lat2","lon2"]},"output_schema":{"type":"object","properties":{"initial_bearing_degrees":{"description":"Heading at the start point, clockwise from true north (0–360). Unit: °.","type":"number","x-unit":"°"},"initial_compass_point":{"description":"16-point compass direction of the initial bearing.","type":"string"},"final_bearing_degrees":{"description":"Heading on arrival at the destination. Unit: °.","type":"number","x-unit":"°"},"final_compass_point":{"description":"16-point compass direction of the final bearing.","type":"string"},"back_bearing_degrees":{"description":"Initial bearing of the return route (final bearing + 180°). Unit: °.","type":"number","x-unit":"°"},"distance_km":{"description":"Great-circle distance (haversine, R = 6371.0088 km). Unit: km.","type":"number","x-unit":"km"},"distance_miles":{"description":"Same distance in statute miles. Unit: mi.","type":"number","x-unit":"mi"}}},"formula":"θ_initial = atan2(sin Δλ · cos φ2, cos φ1 · sin φ2 − sin φ1 · cos φ2 · cos Δλ) mod 360; θ_final = (θ_initial(point 2 → point 1) + 180) mod 360; compass point = round(θ / 22.5) mod 16","method":"Bearings are relative to true north on a spherical Earth. The 16-wind compass rose assigns 22.5° sectors centred on each point (N = 348.75°–11.25°).","sources":[{"name":"Veness C – Calculate distance, bearing and more between latitude/longitude points (Movable Type Scripts)","url":"https://www.movable-type.co.uk/scripts/latlong.html","type":"reference","retrieved_at":"2026-09-24"},{"name":"Points of the compass (Wikipedia)","url":"https://en.wikipedia.org/wiki/Points_of_the_compass","type":"reference","retrieved_at":"2026-09-24"}],"freshness":{"type":"static","max_age_seconds":null,"note":"Deterministic formula with fixed constants; results never go stale. Inputs supplied by the caller determine the output."},"examples":[{"name":"Kansas City → St Louis","inputs":{"lat1":39.099912,"lon1":-94.581213,"lat2":38.627089,"lon2":-90.200203},"expected":{"initial_bearing_degrees":96.51,"initial_compass_point":"E (east)","final_bearing_degrees":99.26,"back_bearing_degrees":279.26,"distance_km":382.9},"url":"https://tttkmbb.com/api/v1/calculate/compass-bearing?lat1=39.099912&lon1=-94.581213&lat2=38.627089&lon2=-90.200203"},{"name":"Movable Type example: 50°03′59″N 5°42′53″W → 58°38′38″N 3°04′12″W","inputs":{"lat1":50.06639,"lon1":-5.71472,"lat2":58.64389,"lon2":-3.07},"expected":{"initial_bearing_degrees":9.12,"initial_compass_point":"N (north)","final_bearing_degrees":11.28,"final_compass_point":"NNE (north-northeast)","back_bearing_degrees":191.28,"distance_km":968.85},"url":"https://tttkmbb.com/api/v1/calculate/compass-bearing?lat1=50.06639&lon1=-5.71472&lat2=58.64389&lon2=-3.07"}],"faq":[{"q":"Why do the initial and final bearings differ?","a":"A great circle is not a line of constant heading: except along the equator or a meridian, the heading drifts as you travel. The difference grows with distance and latitude."},{"q":"Is this a magnetic bearing?","a":"No, it is relative to true north. Subtract the local magnetic declination (east positive) to obtain a magnetic compass heading."}],"tags":["bearing calculator","compass bearing","azimuth between coordinates","heading between two points","compass direction"],"related":[{"calculator_id":"haversine-distance","reason":"Distance, central angle and midpoint of the same route."},{"calculator_id":"coordinate-converter","reason":"Convert DMS coordinates to decimal degrees first."},{"calculator_id":"angle","reason":"Convert bearings between degrees, radians and mils."}],"links":{"html":"https://tttkmbb.com/time/compass-bearing","markdown":"https://tttkmbb.com/time/compass-bearing.md","json":"https://tttkmbb.com/time/compass-bearing.json","api":"https://tttkmbb.com/api/v1/calculate/compass-bearing","schema":"https://tttkmbb.com/api/v1/calculators/compass-bearing","openapi":"https://tttkmbb.com/openapi.json","mcp":"https://tttkmbb.com/mcp"},"version":"v1","updated_at":"2026-09-24"},"timestamp":"2026-09-24T01:45:42Z"}