Last updated: July 31, 2026
Great Circle Calculator
Creators
Dharmendra SinghReviewers

Creators
Dharmendra SinghReviewers
Creators
Dharmendra SinghReviewers

Creators
Dharmendra SinghReviewers
Formula
Use the Haversine formula for distance and spherical trigonometry for initial bearing.
Where:
- lat1=Latitude 1 (degrees)
- lon1=Longitude 1 (degrees)
- lat2=Latitude 2 (degrees)
- lon2=Longitude 2 (degrees)
Worked Examples
New York to London
Estimate transatlantic route.
- 1Convert degrees to radians
- 2Apply Haversine central-angle formula
- 3Convert arc length to km and miles
Tokyo to Sydney
Estimate Pacific route distance.
- 1Compute spherical deltas
- 2Evaluate central angle
- 3Compute initial bearing from point 1
Same point check
Use identical start/end coordinates.
- 1Coordinate deltas are zero
- 2Central angle is zero
- 3Distance resolves to zero
Introduction
Great-circle routes give the shortest travel path on a sphere. This calculator computes distance in km/miles and the initial bearing between coordinates.
Formula Overview
Great Circle Calculator uses a deterministic math model based on the calculator logic in calculation.ts.
Use the Haversine formula for distance and spherical trigonometry for initial bearing.
Inputs are validated before computation
Outputs are rounded consistently for readable results
Invalid values return safe fallback outputs
Input Guide
Use each input key exactly as defined below to match calculator wiring and test coverage.
- 1
lat1: Latitude 1 (degrees)
- 2
lon1: Longitude 1 (degrees)
- 3
lat2: Latitude 2 (degrees)
- 4
lon2: Longitude 2 (degrees)
Output Guide
These output IDs map directly to the return object keys in calculation.ts.
- 1
distanceKm: Shortest spherical-surface distance in kilometers
- 2
distanceMiles: Same distance converted to miles
- 3
bearing: Forward azimuth from point 1 to point 2
Validation Rules
The calculator checks for finite numeric values and applies domain constraints before solving.
Required fields must be present
Domain limits are enforced (for example positive lengths or valid operators)
Invalid or non-finite entries resolve to safe defaults
Use examples to verify expected behavior quickly
How to Use
Enter inputs, run calculation, and interpret the primary output first before reviewing supporting values.
Provide all required inputs
Click calculate
Read primary output first
Use secondary outputs for deeper analysis
Practical Uses
This calculator supports classroom work, engineering checks, and fast verification tasks.
Homework and exam preparation
Design and geometry validation
Spreadsheet cross-checking
Quick scenario analysis
FAQs
What does the Great Circle Calculator compute?
It computes Great-circle Distance (km), Great-circle Distance (miles), Initial Bearing (degrees) from validated input values.
Which inputs are required?
Required inputs are: Latitude 1 (degrees), Longitude 1 (degrees), Latitude 2 (degrees), Longitude 2 (degrees).
How are invalid values handled?
If inputs are invalid or out of domain, the calculator returns safe default outputs instead of invalid math.
Are results rounded?
Yes. Numeric values are rounded in calculation.ts (typically to six decimal places).
Can I use negative or decimal values?
Decimals are accepted where mathematically valid; sign/domain constraints are enforced by the calculator logic.
How can I verify results?
Use the worked examples and compare each output key with manual calculations or trusted references.