Geometry formula reference

Haversine Distance

Approximates great-circle distance between two latitude–longitude points on a sphere.

Open in editor
LaTeXd=2R\arcsin\sqrt{\sin^2\frac{\Delta\varphi}{2}+\cos\varphi_1\cos\varphi_2\sin^2\frac{\Delta\lambda}{2}}

Variables

  • R: sphere radius
  • φ: latitude in radians
  • λ: longitude in radians

How to use this formula

Approximates great-circle distance between two latitude–longitude points on a sphere.

Important notes

  • Earth is not a perfect sphere; ellipsoidal methods are more accurate.

Quick example

Use a consistent radius and convert degrees to radians.

Applicability, worked calculation, and verification

Domain and applicability

Apply Haversine Distance only when the listed variables are defined, denominators are nonzero, and the problem satisfies the assumptions stated on this page.

Assumptions and domain checks

  • Earth is not a perfect sphere; ellipsoidal methods are more accurate.
  • For the Haversine Distance, every denominator must be nonzero, and the numerator and denominator must remain correctly grouped.
  • For a real-valued result, each even-root radicand must be nonnegative unless complex values are intended.
  • The angle unit and the domain or branch of any inverse trigonometric function must be explicit.

Do not use this formula when

  • Do not use Haversine Distance when the stated lengths, angles, or geometric conditions do not match the figure or use inconsistent units.

Boundary and special cases

  • For Haversine Distance, check zero, negative, and extreme input values before relying on the result.
  • When using Haversine Distance, confirm that denominators, radicals, logarithms, and domain restrictions remain valid for the chosen values.

Equivalent and alternative forms

  • Keep the canonical LaTeX form d=2R\arcsin\sqrt{\sin^2\frac{\Delta\varphi}{2}+\cos\varphi_1\cos\varphi_2\sin^2\frac{\Delta\lambda}{2}} for copying; rearrange only after preserving equivalence and domain restrictions.

Worked example

Input

two equatorial points separated by 90° longitude

Output

d=πR/2

For two equatorial points separated by 90° longitude, a=sin²(π/4)=1/2 and d=2Rasin(1/√2)=πR/2.

  1. Convert 90° to Δλ=π/2 and set both latitudes to zero.
  2. Compute the haversine term a=1/2.
  3. Evaluate 2Rasin(√a)=πR/2.

Independent verification

The points are one quarter of a great circle apart, so the distance must be one quarter of 2πR.

Common mistakes

  • When copying Haversine Distance, keep the complete numerator and denominator grouped; a missing brace or parenthesis changes the result.
  • For the Haversine Distance, do not report a length, area, or volume with the wrong unit dimension, and keep intermediate precision until the final rounding step.

Continue the workflow

Use Haversine Distance in your own work

  1. Check the domainMatch the variables and assumptions to the problem before substituting values.
  2. Copy the exact notationPreserve grouping, signs, and exponents in d=2R\arcsin\sqrt{\sin^2\frac{\Delta\varphi}{2}+\cos\varphi_1\cos\varphi_2\sin^2\frac{\Delta\lambda}{2}}.
  3. Edit or convertOpen the expression in the LaTeX editor, then export it for your document or web page.

Review and verification

Last reviewed: 2026-07-26

Review method: Reviewed the notation, variable definitions, applicability conditions, worked workflow, and verification method for Haversine Distance.

Verified against: OpenStax Algebra and Trigonometry

Automated quality check: Passed the core formula indexing gate.

Formula references

  • Algebra and Trigonometry 2eOpenStax, Rice University — Reviewed algebra, functions, sequences, trigonometry, and analytic geometry definitions and examples.

Frequently asked questions

What is the Haversine Distance used for?

Approximates great-circle distance between two latitude–longitude points on a sphere.

Can I copy this formula as LaTeX?

Yes. Copy d=2R\arcsin\sqrt{\sin^2\frac{\Delta\varphi}{2}+\cos\varphi_1\cos\varphi_2\sin^2\frac{\Delta\lambda}{2}} or open it in the LaTeX editor.

What should I check before using it?

Confirm that each variable, unit, domain restriction, and assumption matches the problem.

Reuse, attribution, and correction

Share this reference without losing its source

Copy a citation, permanent link, Markdown link, or self-contained embed card. Each reusable format points readers back to the maintained canonical page.

Report an issue

Search the whole reference

Symbols, formulas, guides, tools and commands

Start typing to search.

move · Enter open · Esc close