Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?


Audit: Complete
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)} Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Complete
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)} Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Complete
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)} Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Complete
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)} Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Needs review
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Note: This page needs review to confirm formulas and sources.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)} Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Needs review
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Note: This page needs review to confirm formulas and sources.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)}$` : ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}$<br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}\]
{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)}$` : ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}$<br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}
Formula (extracted LaTeX)
\[{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}$</p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}$</p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}$</p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">\]
{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}$</p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}$</p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}$</p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">
Formula (extracted text)
$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$
Formula (extracted text)
$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$
Formula (extracted text)
$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$
Variables and units
  • No variables provided in audit spec.
Sources (authoritative):
  • No sources provided in audit spec.
Changelog
Version: 0.1.0-draft
Last code update: 2026-01-19
0.1.0-draft · 2026-01-19
  • Initial audit spec draft generated from HTML extraction (review required).
  • Verify formulas match the calculator engine and convert any text-only formulas to LaTeX.
  • Confirm sources are authoritative and relevant to the calculator methodology.
Verification pending · Last code update: 2026-01-19
lt;br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}\]
{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)}
    
    
    
    Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain
    
    
    
    
    
    
    
    
    
    
    
    
    
    






    





    

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Complete
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)} Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Complete
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)} Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Complete
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)} Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Needs review
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Note: This page needs review to confirm formulas and sources.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)} Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Needs review
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Note: This page needs review to confirm formulas and sources.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)}$` : ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}$<br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}\]
{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)}$` : ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}$<br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}
Formula (extracted LaTeX)
\[{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}$</p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}$</p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}$</p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">\]
{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}$</p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}$</p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}$</p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">
Formula (extracted text)
$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$
Formula (extracted text)
$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$
Formula (extracted text)
$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$
Variables and units
  • No variables provided in audit spec.
Sources (authoritative):
  • No sources provided in audit spec.
Changelog
Version: 0.1.0-draft
Last code update: 2026-01-19
0.1.0-draft · 2026-01-19
  • Initial audit spec draft generated from HTML extraction (review required).
  • Verify formulas match the calculator engine and convert any text-only formulas to LaTeX.
  • Confirm sources are authoritative and relevant to the calculator methodology.
Verification pending · Last code update: 2026-01-19
lt;br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}
Formula (extracted LaTeX)
\[{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}
Audit: Complete
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)} Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Complete
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)} Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Complete
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)} Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Needs review
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Note: This page needs review to confirm formulas and sources.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)} Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Needs review
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Note: This page needs review to confirm formulas and sources.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)}$` : ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}$<br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}\]
{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)}$` : ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}$<br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}
Formula (extracted LaTeX)
\[{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}$</p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}$</p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}$</p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">\]
{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}$</p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}$</p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}$</p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">
Formula (extracted text)
$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$
Formula (extracted text)
$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$
Formula (extracted text)
$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$
Variables and units
  • No variables provided in audit spec.
Sources (authoritative):
  • No sources provided in audit spec.
Changelog
Version: 0.1.0-draft
Last code update: 2026-01-19
0.1.0-draft · 2026-01-19
  • Initial audit spec draft generated from HTML extraction (review required).
  • Verify formulas match the calculator engine and convert any text-only formulas to LaTeX.
  • Confirm sources are authoritative and relevant to the calculator methodology.
Verification pending · Last code update: 2026-01-19
lt;/p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}
Audit: Complete
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)} Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Complete
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)} Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Complete
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)} Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Needs review
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Note: This page needs review to confirm formulas and sources.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)} Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Needs review
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Note: This page needs review to confirm formulas and sources.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)}$` : ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}$<br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}\]
{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)}$` : ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}$<br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}
Formula (extracted LaTeX)
\[{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}$</p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}$</p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}$</p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">\]
{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}$</p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}$</p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}$</p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">
Formula (extracted text)
$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$
Formula (extracted text)
$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$
Formula (extracted text)
$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$
Variables and units
  • No variables provided in audit spec.
Sources (authoritative):
  • No sources provided in audit spec.
Changelog
Version: 0.1.0-draft
Last code update: 2026-01-19
0.1.0-draft · 2026-01-19
  • Initial audit spec draft generated from HTML extraction (review required).
  • Verify formulas match the calculator engine and convert any text-only formulas to LaTeX.
  • Confirm sources are authoritative and relevant to the calculator methodology.
Verification pending · Last code update: 2026-01-19
lt;/p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}
Audit: Complete
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)} Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Complete
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)} Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Complete
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)} Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Needs review
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Note: This page needs review to confirm formulas and sources.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)} Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Needs review
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Note: This page needs review to confirm formulas and sources.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)}$` : ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}$<br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}\]
{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)}$` : ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}$<br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}
Formula (extracted LaTeX)
\[{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}$</p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}$</p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}$</p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">\]
{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}$</p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}$</p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}$</p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">
Formula (extracted text)
$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$
Formula (extracted text)
$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$
Formula (extracted text)
$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$
Variables and units
  • No variables provided in audit spec.
Sources (authoritative):
  • No sources provided in audit spec.
Changelog
Version: 0.1.0-draft
Last code update: 2026-01-19
0.1.0-draft · 2026-01-19
  • Initial audit spec draft generated from HTML extraction (review required).
  • Verify formulas match the calculator engine and convert any text-only formulas to LaTeX.
  • Confirm sources are authoritative and relevant to the calculator methodology.
Verification pending · Last code update: 2026-01-19
lt;/p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">\]
{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}

Audit: Complete
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)} Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Complete
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)} Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Complete
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)} Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Needs review
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Note: This page needs review to confirm formulas and sources.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)} Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Needs review
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Note: This page needs review to confirm formulas and sources.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)}$` : ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}$<br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}\]
{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)}$` : ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}$<br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}
Formula (extracted LaTeX)
\[{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}$</p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}$</p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}$</p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">\]
{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}$</p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}$</p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}$</p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">
Formula (extracted text)
$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$
Formula (extracted text)
$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$
Formula (extracted text)
$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$
Variables and units
  • No variables provided in audit spec.
Sources (authoritative):
  • No sources provided in audit spec.
Changelog
Version: 0.1.0-draft
Last code update: 2026-01-19
0.1.0-draft · 2026-01-19
  • Initial audit spec draft generated from HTML extraction (review required).
  • Verify formulas match the calculator engine and convert any text-only formulas to LaTeX.
  • Confirm sources are authoritative and relevant to the calculator methodology.
Verification pending · Last code update: 2026-01-19
lt;/p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}
Audit: Complete
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)} Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Complete
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)} Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Complete
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)} Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Needs review
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Note: This page needs review to confirm formulas and sources.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)} Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Needs review
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Note: This page needs review to confirm formulas and sources.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)}$` : ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}$<br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}\]
{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)}$` : ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}$<br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}
Formula (extracted LaTeX)
\[{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}$</p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}$</p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}$</p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">\]
{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}$</p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}$</p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}$</p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">
Formula (extracted text)
$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$
Formula (extracted text)
$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$
Formula (extracted text)
$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$
Variables and units
  • No variables provided in audit spec.
Sources (authoritative):
  • No sources provided in audit spec.
Changelog
Version: 0.1.0-draft
Last code update: 2026-01-19
0.1.0-draft · 2026-01-19
  • Initial audit spec draft generated from HTML extraction (review required).
  • Verify formulas match the calculator engine and convert any text-only formulas to LaTeX.
  • Confirm sources are authoritative and relevant to the calculator methodology.
Verification pending · Last code update: 2026-01-19
lt;/p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}
Audit: Complete
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)} Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Complete
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)} Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Complete
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)} Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Needs review
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Note: This page needs review to confirm formulas and sources.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)} Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Needs review
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Note: This page needs review to confirm formulas and sources.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)}$` : ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}$<br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}\]
{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)}$` : ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}$<br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}
Formula (extracted LaTeX)
\[{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}$</p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}$</p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}$</p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">\]
{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}$</p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}$</p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}$</p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">
Formula (extracted text)
$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$
Formula (extracted text)
$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$
Formula (extracted text)
$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$
Variables and units
  • No variables provided in audit spec.
Sources (authoritative):
  • No sources provided in audit spec.
Changelog
Version: 0.1.0-draft
Last code update: 2026-01-19
0.1.0-draft · 2026-01-19
  • Initial audit spec draft generated from HTML extraction (review required).
  • Verify formulas match the calculator engine and convert any text-only formulas to LaTeX.
  • Confirm sources are authoritative and relevant to the calculator methodology.
Verification pending · Last code update: 2026-01-19
lt;/p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">
Formula (extracted text)
$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$
Formula (extracted text)
$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$
Formula (extracted text)
$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$
Variables and units
  • No variables provided in audit spec.
Sources (authoritative):
Changelog
Version: 0.1.0-draft
Last code update: 2026-01-19
0.1.0-draft · 2026-01-19
  • Initial audit spec draft generated from HTML extraction (review required).
  • Verify formulas match the calculator engine and convert any text-only formulas to LaTeX.
  • Confirm sources are authoritative and relevant to the calculator methodology.
Verified by Ugo Candido on 2026-01-19
Profile · LinkedIn
lt;br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}\]
{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)}
    
    
    
    Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain
    
    
    
    
    
    
    
    
    
    
    
    
    
    






    





    

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Complete
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)} Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Complete
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)} Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Needs review
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Note: This page needs review to confirm formulas and sources.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)} Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Needs review
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Note: This page needs review to confirm formulas and sources.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)}$` : ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}$<br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}\]
{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)}$` : ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}$<br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}
Formula (extracted LaTeX)
\[{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}$</p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}$</p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}$</p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">\]
{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}$</p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}$</p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}$</p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">
Formula (extracted text)
$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$
Formula (extracted text)
$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$
Formula (extracted text)
$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$
Variables and units
  • No variables provided in audit spec.
Sources (authoritative):
  • No sources provided in audit spec.
Changelog
Version: 0.1.0-draft
Last code update: 2026-01-19
0.1.0-draft · 2026-01-19
  • Initial audit spec draft generated from HTML extraction (review required).
  • Verify formulas match the calculator engine and convert any text-only formulas to LaTeX.
  • Confirm sources are authoritative and relevant to the calculator methodology.
Verification pending · Last code update: 2026-01-19
lt;br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}
Formula (extracted LaTeX)
\[{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}
Audit: Complete
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)} Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Complete
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)} Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Needs review
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Note: This page needs review to confirm formulas and sources.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)} Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Needs review
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Note: This page needs review to confirm formulas and sources.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)}$` : ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}$<br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}\]
{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)}$` : ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}$<br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}
Formula (extracted LaTeX)
\[{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}$</p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}$</p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}$</p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">\]
{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}$</p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}$</p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}$</p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">
Formula (extracted text)
$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$
Formula (extracted text)
$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$
Formula (extracted text)
$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$
Variables and units
  • No variables provided in audit spec.
Sources (authoritative):
  • No sources provided in audit spec.
Changelog
Version: 0.1.0-draft
Last code update: 2026-01-19
0.1.0-draft · 2026-01-19
  • Initial audit spec draft generated from HTML extraction (review required).
  • Verify formulas match the calculator engine and convert any text-only formulas to LaTeX.
  • Confirm sources are authoritative and relevant to the calculator methodology.
Verification pending · Last code update: 2026-01-19
lt;/p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}
Audit: Complete
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)} Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Complete
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)} Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Needs review
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Note: This page needs review to confirm formulas and sources.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)} Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Needs review
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Note: This page needs review to confirm formulas and sources.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)}$` : ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}$<br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}\]
{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)}$` : ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}$<br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}
Formula (extracted LaTeX)
\[{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}$</p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}$</p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}$</p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">\]
{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}$</p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}$</p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}$</p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">
Formula (extracted text)
$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$
Formula (extracted text)
$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$
Formula (extracted text)
$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$
Variables and units
  • No variables provided in audit spec.
Sources (authoritative):
  • No sources provided in audit spec.
Changelog
Version: 0.1.0-draft
Last code update: 2026-01-19
0.1.0-draft · 2026-01-19
  • Initial audit spec draft generated from HTML extraction (review required).
  • Verify formulas match the calculator engine and convert any text-only formulas to LaTeX.
  • Confirm sources are authoritative and relevant to the calculator methodology.
Verification pending · Last code update: 2026-01-19
lt;/p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}
Audit: Complete
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)} Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Complete
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)} Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Needs review
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Note: This page needs review to confirm formulas and sources.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)} Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Needs review
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Note: This page needs review to confirm formulas and sources.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)}$` : ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}$<br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}\]
{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)}$` : ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}$<br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}
Formula (extracted LaTeX)
\[{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}$</p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}$</p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}$</p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">\]
{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}$</p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}$</p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}$</p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">
Formula (extracted text)
$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$
Formula (extracted text)
$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$
Formula (extracted text)
$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$
Variables and units
  • No variables provided in audit spec.
Sources (authoritative):
  • No sources provided in audit spec.
Changelog
Version: 0.1.0-draft
Last code update: 2026-01-19
0.1.0-draft · 2026-01-19
  • Initial audit spec draft generated from HTML extraction (review required).
  • Verify formulas match the calculator engine and convert any text-only formulas to LaTeX.
  • Confirm sources are authoritative and relevant to the calculator methodology.
Verification pending · Last code update: 2026-01-19
lt;/p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">\]
{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}

Audit: Complete
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)} Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Complete
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)} Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Needs review
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Note: This page needs review to confirm formulas and sources.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)} Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Needs review
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Note: This page needs review to confirm formulas and sources.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)}$` : ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}$<br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}\]
{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)}$` : ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}$<br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}
Formula (extracted LaTeX)
\[{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}$</p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}$</p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}$</p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">\]
{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}$</p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}$</p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}$</p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">
Formula (extracted text)
$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$
Formula (extracted text)
$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$
Formula (extracted text)
$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$
Variables and units
  • No variables provided in audit spec.
Sources (authoritative):
  • No sources provided in audit spec.
Changelog
Version: 0.1.0-draft
Last code update: 2026-01-19
0.1.0-draft · 2026-01-19
  • Initial audit spec draft generated from HTML extraction (review required).
  • Verify formulas match the calculator engine and convert any text-only formulas to LaTeX.
  • Confirm sources are authoritative and relevant to the calculator methodology.
Verification pending · Last code update: 2026-01-19
lt;/p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}
Audit: Complete
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)} Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Complete
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)} Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Needs review
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Note: This page needs review to confirm formulas and sources.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)} Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Needs review
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Note: This page needs review to confirm formulas and sources.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)}$` : ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}$<br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}\]
{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)}$` : ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}$<br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}
Formula (extracted LaTeX)
\[{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}$</p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}$</p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}$</p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">\]
{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}$</p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}$</p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}$</p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">
Formula (extracted text)
$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$
Formula (extracted text)
$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$
Formula (extracted text)
$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$
Variables and units
  • No variables provided in audit spec.
Sources (authoritative):
  • No sources provided in audit spec.
Changelog
Version: 0.1.0-draft
Last code update: 2026-01-19
0.1.0-draft · 2026-01-19
  • Initial audit spec draft generated from HTML extraction (review required).
  • Verify formulas match the calculator engine and convert any text-only formulas to LaTeX.
  • Confirm sources are authoritative and relevant to the calculator methodology.
Verification pending · Last code update: 2026-01-19
lt;/p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}
Audit: Complete
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)} Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Complete
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)} Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Needs review
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Note: This page needs review to confirm formulas and sources.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)} Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Needs review
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Note: This page needs review to confirm formulas and sources.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)}$` : ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}$<br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}\]
{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)}$` : ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}$<br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}
Formula (extracted LaTeX)
\[{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}$</p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}$</p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}$</p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">\]
{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}$</p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}$</p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}$</p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">
Formula (extracted text)
$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$
Formula (extracted text)
$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$
Formula (extracted text)
$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$
Variables and units
  • No variables provided in audit spec.
Sources (authoritative):
  • No sources provided in audit spec.
Changelog
Version: 0.1.0-draft
Last code update: 2026-01-19
0.1.0-draft · 2026-01-19
  • Initial audit spec draft generated from HTML extraction (review required).
  • Verify formulas match the calculator engine and convert any text-only formulas to LaTeX.
  • Confirm sources are authoritative and relevant to the calculator methodology.
Verification pending · Last code update: 2026-01-19
lt;/p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">
Formula (extracted text)
$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$
Formula (extracted text)
$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$
Formula (extracted text)
$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$
Variables and units
  • No variables provided in audit spec.
Sources (authoritative):
Changelog
Version: 0.1.0-draft
Last code update: 2026-01-19
0.1.0-draft · 2026-01-19
  • Initial audit spec draft generated from HTML extraction (review required).
  • Verify formulas match the calculator engine and convert any text-only formulas to LaTeX.
  • Confirm sources are authoritative and relevant to the calculator methodology.
Verified by Ugo Candido on 2026-01-19
Profile · LinkedIn
lt;br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}\]
{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)}
    
    
    
    Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain
    
    
    
    
    
    
    
    
    
    
    
    
    
    






    





    

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Complete
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)} Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Needs review
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Note: This page needs review to confirm formulas and sources.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)} Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Needs review
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Note: This page needs review to confirm formulas and sources.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)}$` : ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}$<br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}\]
{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)}$` : ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}$<br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}
Formula (extracted LaTeX)
\[{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}$</p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}$</p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}$</p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">\]
{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}$</p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}$</p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}$</p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">
Formula (extracted text)
$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$
Formula (extracted text)
$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$
Formula (extracted text)
$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$
Variables and units
  • No variables provided in audit spec.
Sources (authoritative):
  • No sources provided in audit spec.
Changelog
Version: 0.1.0-draft
Last code update: 2026-01-19
0.1.0-draft · 2026-01-19
  • Initial audit spec draft generated from HTML extraction (review required).
  • Verify formulas match the calculator engine and convert any text-only formulas to LaTeX.
  • Confirm sources are authoritative and relevant to the calculator methodology.
Verification pending · Last code update: 2026-01-19
lt;br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}
Formula (extracted LaTeX)
\[{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}
Audit: Complete
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)} Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Needs review
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Note: This page needs review to confirm formulas and sources.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)} Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Needs review
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Note: This page needs review to confirm formulas and sources.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)}$` : ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}$<br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}\]
{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)}$` : ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}$<br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}
Formula (extracted LaTeX)
\[{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}$</p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}$</p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}$</p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">\]
{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}$</p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}$</p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}$</p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">
Formula (extracted text)
$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$
Formula (extracted text)
$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$
Formula (extracted text)
$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$
Variables and units
  • No variables provided in audit spec.
Sources (authoritative):
  • No sources provided in audit spec.
Changelog
Version: 0.1.0-draft
Last code update: 2026-01-19
0.1.0-draft · 2026-01-19
  • Initial audit spec draft generated from HTML extraction (review required).
  • Verify formulas match the calculator engine and convert any text-only formulas to LaTeX.
  • Confirm sources are authoritative and relevant to the calculator methodology.
Verification pending · Last code update: 2026-01-19
lt;/p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}
Audit: Complete
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)} Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Needs review
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Note: This page needs review to confirm formulas and sources.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)} Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Needs review
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Note: This page needs review to confirm formulas and sources.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)}$` : ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}$<br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}\]
{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)}$` : ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}$<br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}
Formula (extracted LaTeX)
\[{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}$</p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}$</p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}$</p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">\]
{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}$</p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}$</p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}$</p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">
Formula (extracted text)
$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$
Formula (extracted text)
$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$
Formula (extracted text)
$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$
Variables and units
  • No variables provided in audit spec.
Sources (authoritative):
  • No sources provided in audit spec.
Changelog
Version: 0.1.0-draft
Last code update: 2026-01-19
0.1.0-draft · 2026-01-19
  • Initial audit spec draft generated from HTML extraction (review required).
  • Verify formulas match the calculator engine and convert any text-only formulas to LaTeX.
  • Confirm sources are authoritative and relevant to the calculator methodology.
Verification pending · Last code update: 2026-01-19
lt;/p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}
Audit: Complete
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)} Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Needs review
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Note: This page needs review to confirm formulas and sources.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)} Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Needs review
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Note: This page needs review to confirm formulas and sources.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)}$` : ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}$<br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}\]
{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)}$` : ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}$<br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}
Formula (extracted LaTeX)
\[{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}$</p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}$</p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}$</p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">\]
{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}$</p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}$</p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}$</p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">
Formula (extracted text)
$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$
Formula (extracted text)
$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$
Formula (extracted text)
$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$
Variables and units
  • No variables provided in audit spec.
Sources (authoritative):
  • No sources provided in audit spec.
Changelog
Version: 0.1.0-draft
Last code update: 2026-01-19
0.1.0-draft · 2026-01-19
  • Initial audit spec draft generated from HTML extraction (review required).
  • Verify formulas match the calculator engine and convert any text-only formulas to LaTeX.
  • Confirm sources are authoritative and relevant to the calculator methodology.
Verification pending · Last code update: 2026-01-19
lt;/p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">\]
{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}

Audit: Complete
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)} Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Needs review
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Note: This page needs review to confirm formulas and sources.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)} Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Needs review
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Note: This page needs review to confirm formulas and sources.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)}$` : ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}$<br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}\]
{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)}$` : ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}$<br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}
Formula (extracted LaTeX)
\[{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}$</p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}$</p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}$</p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">\]
{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}$</p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}$</p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}$</p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">
Formula (extracted text)
$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$
Formula (extracted text)
$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$
Formula (extracted text)
$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$
Variables and units
  • No variables provided in audit spec.
Sources (authoritative):
  • No sources provided in audit spec.
Changelog
Version: 0.1.0-draft
Last code update: 2026-01-19
0.1.0-draft · 2026-01-19
  • Initial audit spec draft generated from HTML extraction (review required).
  • Verify formulas match the calculator engine and convert any text-only formulas to LaTeX.
  • Confirm sources are authoritative and relevant to the calculator methodology.
Verification pending · Last code update: 2026-01-19
lt;/p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}
Audit: Complete
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)} Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Needs review
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Note: This page needs review to confirm formulas and sources.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)} Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Needs review
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Note: This page needs review to confirm formulas and sources.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)}$` : ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}$<br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}\]
{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)}$` : ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}$<br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}
Formula (extracted LaTeX)
\[{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}$</p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}$</p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}$</p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">\]
{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}$</p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}$</p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}$</p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">
Formula (extracted text)
$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$
Formula (extracted text)
$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$
Formula (extracted text)
$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$
Variables and units
  • No variables provided in audit spec.
Sources (authoritative):
  • No sources provided in audit spec.
Changelog
Version: 0.1.0-draft
Last code update: 2026-01-19
0.1.0-draft · 2026-01-19
  • Initial audit spec draft generated from HTML extraction (review required).
  • Verify formulas match the calculator engine and convert any text-only formulas to LaTeX.
  • Confirm sources are authoritative and relevant to the calculator methodology.
Verification pending · Last code update: 2026-01-19
lt;/p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}
Audit: Complete
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)} Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Needs review
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Note: This page needs review to confirm formulas and sources.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)} Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Needs review
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Note: This page needs review to confirm formulas and sources.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)}$` : ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}$<br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}\]
{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)}$` : ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}$<br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}
Formula (extracted LaTeX)
\[{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}$</p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}$</p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}$</p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">\]
{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}$</p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}$</p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}$</p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">
Formula (extracted text)
$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$
Formula (extracted text)
$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$
Formula (extracted text)
$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$
Variables and units
  • No variables provided in audit spec.
Sources (authoritative):
  • No sources provided in audit spec.
Changelog
Version: 0.1.0-draft
Last code update: 2026-01-19
0.1.0-draft · 2026-01-19
  • Initial audit spec draft generated from HTML extraction (review required).
  • Verify formulas match the calculator engine and convert any text-only formulas to LaTeX.
  • Confirm sources are authoritative and relevant to the calculator methodology.
Verification pending · Last code update: 2026-01-19
lt;/p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">
Formula (extracted text)
$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$
Formula (extracted text)
$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$
Formula (extracted text)
$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$
Variables and units
  • No variables provided in audit spec.
Sources (authoritative):
Changelog
Version: 0.1.0-draft
Last code update: 2026-01-19
0.1.0-draft · 2026-01-19
  • Initial audit spec draft generated from HTML extraction (review required).
  • Verify formulas match the calculator engine and convert any text-only formulas to LaTeX.
  • Confirm sources are authoritative and relevant to the calculator methodology.
Verified by Ugo Candido on 2026-01-19
Profile · LinkedIn
lt;br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}\]
{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)}
    
    
    
    Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain
    
    
    
    
    
    
    
    
    
    
    
    
    
    






    





    

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Needs review
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Note: This page needs review to confirm formulas and sources.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)} Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Needs review
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Note: This page needs review to confirm formulas and sources.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)}$` : ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}$<br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}\]
{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)}$` : ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}$<br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}
Formula (extracted LaTeX)
\[{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}$</p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}$</p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}$</p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">\]
{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}$</p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}$</p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}$</p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">
Formula (extracted text)
$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$
Formula (extracted text)
$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$
Formula (extracted text)
$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$
Variables and units
  • No variables provided in audit spec.
Sources (authoritative):
  • No sources provided in audit spec.
Changelog
Version: 0.1.0-draft
Last code update: 2026-01-19
0.1.0-draft · 2026-01-19
  • Initial audit spec draft generated from HTML extraction (review required).
  • Verify formulas match the calculator engine and convert any text-only formulas to LaTeX.
  • Confirm sources are authoritative and relevant to the calculator methodology.
Verification pending · Last code update: 2026-01-19
lt;br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}
Formula (extracted LaTeX)
\[{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}
Audit: Needs review
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Note: This page needs review to confirm formulas and sources.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)} Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Needs review
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Note: This page needs review to confirm formulas and sources.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)}$` : ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}$<br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}\]
{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)}$` : ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}$<br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}
Formula (extracted LaTeX)
\[{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}$</p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}$</p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}$</p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">\]
{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}$</p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}$</p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}$</p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">
Formula (extracted text)
$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$
Formula (extracted text)
$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$
Formula (extracted text)
$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$
Variables and units
  • No variables provided in audit spec.
Sources (authoritative):
  • No sources provided in audit spec.
Changelog
Version: 0.1.0-draft
Last code update: 2026-01-19
0.1.0-draft · 2026-01-19
  • Initial audit spec draft generated from HTML extraction (review required).
  • Verify formulas match the calculator engine and convert any text-only formulas to LaTeX.
  • Confirm sources are authoritative and relevant to the calculator methodology.
Verification pending · Last code update: 2026-01-19
lt;/p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}
Audit: Needs review
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Note: This page needs review to confirm formulas and sources.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)} Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Needs review
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Note: This page needs review to confirm formulas and sources.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)}$` : ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}$<br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}\]
{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)}$` : ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}$<br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}
Formula (extracted LaTeX)
\[{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}$</p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}$</p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}$</p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">\]
{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}$</p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}$</p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}$</p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">
Formula (extracted text)
$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$
Formula (extracted text)
$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$
Formula (extracted text)
$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$
Variables and units
  • No variables provided in audit spec.
Sources (authoritative):
  • No sources provided in audit spec.
Changelog
Version: 0.1.0-draft
Last code update: 2026-01-19
0.1.0-draft · 2026-01-19
  • Initial audit spec draft generated from HTML extraction (review required).
  • Verify formulas match the calculator engine and convert any text-only formulas to LaTeX.
  • Confirm sources are authoritative and relevant to the calculator methodology.
Verification pending · Last code update: 2026-01-19
lt;/p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}
Audit: Needs review
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Note: This page needs review to confirm formulas and sources.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)} Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Needs review
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Note: This page needs review to confirm formulas and sources.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)}$` : ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}$<br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}\]
{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)}$` : ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}$<br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}
Formula (extracted LaTeX)
\[{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}$</p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}$</p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}$</p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">\]
{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}$</p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}$</p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}$</p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">
Formula (extracted text)
$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$
Formula (extracted text)
$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$
Formula (extracted text)
$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$
Variables and units
  • No variables provided in audit spec.
Sources (authoritative):
  • No sources provided in audit spec.
Changelog
Version: 0.1.0-draft
Last code update: 2026-01-19
0.1.0-draft · 2026-01-19
  • Initial audit spec draft generated from HTML extraction (review required).
  • Verify formulas match the calculator engine and convert any text-only formulas to LaTeX.
  • Confirm sources are authoritative and relevant to the calculator methodology.
Verification pending · Last code update: 2026-01-19
lt;/p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">\]
{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}

Audit: Needs review
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Note: This page needs review to confirm formulas and sources.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)} Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Needs review
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Note: This page needs review to confirm formulas and sources.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)}$` : ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}$<br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}\]
{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)}$` : ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}$<br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}
Formula (extracted LaTeX)
\[{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}$</p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}$</p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}$</p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">\]
{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}$</p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}$</p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}$</p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">
Formula (extracted text)
$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$
Formula (extracted text)
$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$
Formula (extracted text)
$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$
Variables and units
  • No variables provided in audit spec.
Sources (authoritative):
  • No sources provided in audit spec.
Changelog
Version: 0.1.0-draft
Last code update: 2026-01-19
0.1.0-draft · 2026-01-19
  • Initial audit spec draft generated from HTML extraction (review required).
  • Verify formulas match the calculator engine and convert any text-only formulas to LaTeX.
  • Confirm sources are authoritative and relevant to the calculator methodology.
Verification pending · Last code update: 2026-01-19
lt;/p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}
Audit: Needs review
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Note: This page needs review to confirm formulas and sources.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)} Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Needs review
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Note: This page needs review to confirm formulas and sources.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)}$` : ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}$<br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}\]
{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)}$` : ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}$<br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}
Formula (extracted LaTeX)
\[{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}$</p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}$</p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}$</p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">\]
{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}$</p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}$</p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}$</p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">
Formula (extracted text)
$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$
Formula (extracted text)
$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$
Formula (extracted text)
$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$
Variables and units
  • No variables provided in audit spec.
Sources (authoritative):
  • No sources provided in audit spec.
Changelog
Version: 0.1.0-draft
Last code update: 2026-01-19
0.1.0-draft · 2026-01-19
  • Initial audit spec draft generated from HTML extraction (review required).
  • Verify formulas match the calculator engine and convert any text-only formulas to LaTeX.
  • Confirm sources are authoritative and relevant to the calculator methodology.
Verification pending · Last code update: 2026-01-19
lt;/p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}
Audit: Needs review
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Note: This page needs review to confirm formulas and sources.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)} Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Needs review
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Note: This page needs review to confirm formulas and sources.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)}$` : ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}$<br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}\]
{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)}$` : ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}$<br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}
Formula (extracted LaTeX)
\[{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}$</p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}$</p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}$</p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">\]
{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}$</p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}$</p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}$</p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">
Formula (extracted text)
$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$
Formula (extracted text)
$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$
Formula (extracted text)
$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$
Variables and units
  • No variables provided in audit spec.
Sources (authoritative):
  • No sources provided in audit spec.
Changelog
Version: 0.1.0-draft
Last code update: 2026-01-19
0.1.0-draft · 2026-01-19
  • Initial audit spec draft generated from HTML extraction (review required).
  • Verify formulas match the calculator engine and convert any text-only formulas to LaTeX.
  • Confirm sources are authoritative and relevant to the calculator methodology.
Verification pending · Last code update: 2026-01-19
lt;/p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">
Formula (extracted text)
$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$
Formula (extracted text)
$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$
Formula (extracted text)
$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$
Variables and units
  • No variables provided in audit spec.
Sources (authoritative):
Changelog
Version: 0.1.0-draft
Last code update: 2026-01-19
0.1.0-draft · 2026-01-19
  • Initial audit spec draft generated from HTML extraction (review required).
  • Verify formulas match the calculator engine and convert any text-only formulas to LaTeX.
  • Confirm sources are authoritative and relevant to the calculator methodology.
Verified by Ugo Candido on 2026-01-19
Profile · LinkedIn
lt;br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}\]
{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)}
    
    
    
    Distance Calculator (2D & 3D Euclidean Formula) | CalcDomain
    
    
    
    
    
    
    
    
    
    
    
    
    
    






    





    

Distance Calculator (Euclidean Coordinate Distance)

Calculate the shortest straight-line distance ($D$) between two points, $P_1$ and $P_2$, in a two-dimensional (2D) or three-dimensional (3D) coordinate system. Enter the coordinates of both points below.

Endpoints $P_1$ and $P_2$

Point

X-Coordinate

Y-Coordinate

Z-Coordinate (Optional)

P₁

P₂

Leave Z coordinates blank for a 2D calculation.

The Euclidean Distance Formula

The distance formula is a direct application of the Pythagorean Theorem in a coordinate system. It finds the length of the hypotenuse created by the differences in the $x$ and $y$ coordinates ($\Delta x$ and $\Delta y$).

Distance Formula (2D)

Given points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the distance $D$ is:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

Distance Formula (3D)

For three dimensions, the formula simply adds the difference in the $z$ coordinates:

$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

Related Formula: Midpoint

The midpoint ($M$) is the coordinate point exactly halfway between the two endpoints. Since the calculation relies on the same input coordinates, this calculator provides it as a helpful related value:

$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$

Frequently Asked Questions (FAQ)

What is the Euclidean Distance Formula (2D)?

How does the distance formula relate to the Pythagorean Theorem?

What is the difference between Euclidean and Geodesic distance?

Can the distance calculator handle negative coordinates?

: ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}
Audit: Needs review
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Note: This page needs review to confirm formulas and sources.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)}$` : ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}$<br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}\]
{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)}$` : ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}$<br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}
Formula (extracted LaTeX)
\[{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}$</p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}$</p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}$</p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">\]
{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}$</p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}$</p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}$</p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">
Formula (extracted text)
$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$
Formula (extracted text)
$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$
Formula (extracted text)
$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$
Variables and units
  • No variables provided in audit spec.
Sources (authoritative):
  • No sources provided in audit spec.
Changelog
Version: 0.1.0-draft
Last code update: 2026-01-19
0.1.0-draft · 2026-01-19
  • Initial audit spec draft generated from HTML extraction (review required).
  • Verify formulas match the calculator engine and convert any text-only formulas to LaTeX.
  • Confirm sources are authoritative and relevant to the calculator methodology.
Verification pending · Last code update: 2026-01-19
lt;br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}
Formula (extracted LaTeX)
\[{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}
Audit: Needs review
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Note: This page needs review to confirm formulas and sources.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)}$` : ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}$<br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}\]
{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)}$` : ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}$<br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}
Formula (extracted LaTeX)
\[{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}$</p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}$</p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}$</p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">\]
{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}$</p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}$</p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}$</p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">
Formula (extracted text)
$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$
Formula (extracted text)
$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$
Formula (extracted text)
$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$
Variables and units
  • No variables provided in audit spec.
Sources (authoritative):
  • No sources provided in audit spec.
Changelog
Version: 0.1.0-draft
Last code update: 2026-01-19
0.1.0-draft · 2026-01-19
  • Initial audit spec draft generated from HTML extraction (review required).
  • Verify formulas match the calculator engine and convert any text-only formulas to LaTeX.
  • Confirm sources are authoritative and relevant to the calculator methodology.
Verification pending · Last code update: 2026-01-19
lt;/p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}
Audit: Needs review
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Note: This page needs review to confirm formulas and sources.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)}$` : ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}$<br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}\]
{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)}$` : ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}$<br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}
Formula (extracted LaTeX)
\[{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}$</p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}$</p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}$</p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">\]
{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}$</p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}$</p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}$</p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">
Formula (extracted text)
$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$
Formula (extracted text)
$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$
Formula (extracted text)
$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$
Variables and units
  • No variables provided in audit spec.
Sources (authoritative):
  • No sources provided in audit spec.
Changelog
Version: 0.1.0-draft
Last code update: 2026-01-19
0.1.0-draft · 2026-01-19
  • Initial audit spec draft generated from HTML extraction (review required).
  • Verify formulas match the calculator engine and convert any text-only formulas to LaTeX.
  • Confirm sources are authoritative and relevant to the calculator methodology.
Verification pending · Last code update: 2026-01-19
lt;/p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}
Audit: Needs review
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Note: This page needs review to confirm formulas and sources.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)}$` : ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}$<br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}\]
{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)}$` : ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}$<br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}
Formula (extracted LaTeX)
\[{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}$</p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}$</p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}$</p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">\]
{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}$</p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}$</p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}$</p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">
Formula (extracted text)
$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$
Formula (extracted text)
$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$
Formula (extracted text)
$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$
Variables and units
  • No variables provided in audit spec.
Sources (authoritative):
  • No sources provided in audit spec.
Changelog
Version: 0.1.0-draft
Last code update: 2026-01-19
0.1.0-draft · 2026-01-19
  • Initial audit spec draft generated from HTML extraction (review required).
  • Verify formulas match the calculator engine and convert any text-only formulas to LaTeX.
  • Confirm sources are authoritative and relevant to the calculator methodology.
Verification pending · Last code update: 2026-01-19
lt;/p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">\]
{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}

Audit: Needs review
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Note: This page needs review to confirm formulas and sources.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)}$` : ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}$<br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}\]
{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)}$` : ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}$<br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}
Formula (extracted LaTeX)
\[{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}$</p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}$</p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}$</p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">\]
{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}$</p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}$</p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}$</p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">
Formula (extracted text)
$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$
Formula (extracted text)
$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$
Formula (extracted text)
$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$
Variables and units
  • No variables provided in audit spec.
Sources (authoritative):
  • No sources provided in audit spec.
Changelog
Version: 0.1.0-draft
Last code update: 2026-01-19
0.1.0-draft · 2026-01-19
  • Initial audit spec draft generated from HTML extraction (review required).
  • Verify formulas match the calculator engine and convert any text-only formulas to LaTeX.
  • Confirm sources are authoritative and relevant to the calculator methodology.
Verification pending · Last code update: 2026-01-19
lt;/p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}
Audit: Needs review
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Note: This page needs review to confirm formulas and sources.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)}$` : ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}$<br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}\]
{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)}$` : ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}$<br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}
Formula (extracted LaTeX)
\[{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}$</p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}$</p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}$</p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">\]
{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}$</p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}$</p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}$</p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">
Formula (extracted text)
$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$
Formula (extracted text)
$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$
Formula (extracted text)
$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$
Variables and units
  • No variables provided in audit spec.
Sources (authoritative):
  • No sources provided in audit spec.
Changelog
Version: 0.1.0-draft
Last code update: 2026-01-19
0.1.0-draft · 2026-01-19
  • Initial audit spec draft generated from HTML extraction (review required).
  • Verify formulas match the calculator engine and convert any text-only formulas to LaTeX.
  • Confirm sources are authoritative and relevant to the calculator methodology.
Verification pending · Last code update: 2026-01-19
lt;/p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}
Audit: Needs review
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Note: This page needs review to confirm formulas and sources.
Formula (extracted LaTeX)
\[','\]
','
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Formula (extracted LaTeX)
\[D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}\]
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}
Formula (extracted LaTeX)
\[M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)\]
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)
Formula (extracted LaTeX)
\[{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)}$` : ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}$<br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}\]
{is3D ? `<br>$\\Delta z = z_2 - z_1 = ${formatNumber(p2.z)} - ${formatNumber(p1.z)} = ${formatNumber(dz)}$` : ''} </p> <p>2. <strong>Square and Sum the Differences:</strong></p> <p class="formula-box text-center"> $(\\Delta x)^2 = ${formatNumber(dx_sq)}$<br> $(\\Delta y)^2 = ${formatNumber(dy_sq)}
Formula (extracted LaTeX)
\[{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}$</p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}$</p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}$</p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">\]
{is3D ? ` + ${formatNumber(dz_sq)}` : ''} = ${formatNumber(sum_sq)}$ </p> <p>3. <strong>Calculate Distance ($D$):</strong> Take the square root of the sum.</p> <p class="formula-box text-center"> $D = \\sqrt{\\sum} = \\sqrt{${formatNumber(sum_sq)}} \\approx ${formatNumber(distance)}$ </p> <h4 class="font-semibold text-lg mt-4">Midpoint Calculation:</h4> <p>Midpoint X: $\\frac{x_1 + x_2}{2} = \\frac{${formatNumber(p1.x)} + ${formatNumber(p2.x)}}{2} = ${formatNumber(Mx)}$</p> <p>Midpoint Y: $\\frac{y_1 + y_2}{2} = \\frac{${formatNumber(p1.y)} + ${formatNumber(p2.y)}}{2} = ${formatNumber(My)}$</p> ${is3D ? `<p>Midpoint Z: $\\frac{z_1 + z_2}{2} = \\frac{${formatNumber(p1.z)} + ${formatNumber(p2.z)}}{2} = ${formatNumber(Mz)}$</p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">
Formula (extracted text)
$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$
Formula (extracted text)
$$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$
Formula (extracted text)
$$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$$
Variables and units
  • No variables provided in audit spec.
Sources (authoritative):
  • No sources provided in audit spec.
Changelog
Version: 0.1.0-draft
Last code update: 2026-01-19
0.1.0-draft · 2026-01-19
  • Initial audit spec draft generated from HTML extraction (review required).
  • Verify formulas match the calculator engine and convert any text-only formulas to LaTeX.
  • Confirm sources are authoritative and relevant to the calculator methodology.
Verification pending · Last code update: 2026-01-19
lt;/p>` : ''} `; // 4. Update DOM const midpointCoords = `(${formatNumber(Mx)}, ${formatNumber(My)}${is3D ? `, ${formatNumber(Mz)}` : ''})`; resultDistance.textContent = formatNumber(distance); resultMidpoint.textContent = midpointCoords; stepByStep.innerHTML = steps; resultsContainer.classList.remove('hidden'); // Re-render MathJax if (window.MathJax) { window.MathJax.typesetPromise([stepByStep]); } } catch (e) { showError(e.message); } }); // Initial calculation (for example values) calculateBtn.click(); }); </script> </div> </main> <aside class="w-full lg:w-1/3"> <div class="sticky top-28 space-y-6"> <div class="bg-white p-6 rounded-lg shadow-md"> <h3 class="text-xl font-semibold mb-4">Core Formulas</h3> <div class="text-center font-bold text-gray-700 space-y-4"> <div class="p-3 bg-blue-50 rounded-lg"> <p class="text-sm text-gray-600">Distance (2D)</p> <p class="text-xl text-blue-600">
Formula (extracted text)
$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$
Formula (extracted text)
$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$
Formula (extracted text)
$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \dots \right)$
Variables and units
  • No variables provided in audit spec.
Sources (authoritative):
  • No sources provided in audit spec.
Changelog
Version: 0.1.0-draft
Last code update: 2026-01-19
0.1.0-draft · 2026-01-19
  • Initial audit spec draft generated from HTML extraction (review required).
  • Verify formulas match the calculator engine and convert any text-only formulas to LaTeX.
  • Confirm sources are authoritative and relevant to the calculator methodology.
Verification pending · Last code update: 2026-01-19
, ', svg: { fontCache: 'global' } }; ]], displayMath: [['\\[','\\]']] }, svg: { fontCache: 'global' } };, svg: { fontCache: 'global' } };