{
    "name": "Coordinate Midpoint Calculator",
    "url": "https://calculators.geekmidst.com/calculators/coordinate-midpoint-calculator",
    "markdown": "https://calculators.geekmidst.com/calculators/coordinate-midpoint-calculator.md",
    "category": "Algebra, geometry & advanced math",
    "description": "Find the true midpoint of two latitude/longitude points on the globe, or the geographic centre of up to 200 points, without the errors of simple averaging.",
    "summary": "Averaging latitudes and longitudes goes wrong across the 180° meridian and at high latitudes. This converts each point to a 3-D unit vector, averages those and converts back.",
    "also_called": [
        "Geographic midpoint calculator",
        "Centre of coordinates calculator"
    ],
    "applies_to": "Worldwide",
    "last_updated": "2026-10-29",
    "computation": "Results are computed in the visitor’s browser on the HTML page. This API describes the calculator; it does not compute results.",
    "inputs": [
        {
            "name": "points",
            "label": "Points (latitude, longitude)",
            "type": "textarea",
            "default": "51.5074, -0.1278\n40.7128, -74.0060"
        }
    ],
    "outputs": [
        {
            "key": "midpoint",
            "label": "Midpoint (lat, lon)",
            "format": "text"
        },
        {
            "key": "latitude",
            "label": "Latitude",
            "format": "number"
        },
        {
            "key": "longitude",
            "label": "Longitude",
            "format": "number"
        },
        {
            "key": "midpoint_dms",
            "label": "Midpoint in DMS",
            "format": "text"
        },
        {
            "key": "farthest_km",
            "label": "Distance to the farthest point",
            "format": "number"
        },
        {
            "key": "simple_average",
            "label": "Simple lat/lon average (for comparison)",
            "format": "text"
        },
        {
            "key": "count",
            "label": "Points used",
            "format": "integer"
        }
    ],
    "formula": {
        "text": "For each point: x = cos φ cos λ, y = cos φ sin λ, z = sin φ;  sum the vectors;  φₘ = atan2(Z, √(X² + Y²)), λₘ = atan2(Y, X)",
        "variables": {
            "φ, λ": "latitude and longitude",
            "X, Y, Z": "sums of the unit vectors",
            "φₘ, λₘ": "midpoint latitude and longitude"
        }
    },
    "worked_example": {
        "inputs": {
            "points": "51.5074, -0.1278\n40.7128, -74.0060"
        },
        "steps": [
            "London → (0.62241, −0.00139, 0.78269); New York → (0.20885, −0.72865, 0.65227).",
            "Sum: X = 0.83127, Y = −0.73004, Z = 1.43496.",
            "Latitude = atan2(Z, √(X² + Y²)) ≈ 52.36844°; longitude = atan2(Y, X) ≈ −41.29031°.",
            "Each city is half the 5,570.23 km great-circle distance away: 2,785.115 km."
        ],
        "result": "The great-circle halfway point between London and New York is about 52.3684°N, 41.2903°W, in the North Atlantic south of Greenland, about 2,785 km from each city."
    },
    "interpretation": "For two points the result is exactly halfway along the great circle. For several points it is the centre of their unit vectors projected back to the surface, which is a good “central meeting point” but not the point that minimises total travel distance.",
    "assumptions": [
        "Spherical Earth with mean radius 6,371.0088 km for distances.",
        "All points have equal weight."
    ],
    "limitations": [
        "Undefined when the points balance out exactly (for example two antipodal points).",
        "For a flat x–y midpoint use the Distance Calculator instead."
    ],
    "rules": null,
    "faqs": [
        {
            "question": "Why is the midpoint of London and New York so far north?",
            "answer": "The shortest route between them curves north on a flat map, so its halfway point lies north of both cities’ latitudes."
        },
        {
            "question": "Can I use it for a plain x, y midpoint?",
            "answer": "No; that is ((x₁ + x₂) ÷ 2, (y₁ + y₂) ÷ 2), which the Distance Calculator gives. This tool is for points on the globe."
        }
    ],
    "sources": [],
    "related": [
        {
            "name": "Great Circle Distance Calculator",
            "url": "https://calculators.geekmidst.com/calculators/great-circle-distance-calculator"
        },
        {
            "name": "Bearing Between Coordinates Calculator",
            "url": "https://calculators.geekmidst.com/calculators/bearing-between-coordinates-calculator"
        },
        {
            "name": "Distance Calculator",
            "url": "https://calculators.geekmidst.com/calculators/distance-calculator"
        }
    ],
    "disclaimer": null,
    "publisher": "GM¹X CalcVerse"
}