Math Solver Free

Distance Formula

The distance formula turns two coordinate pairs into one straight-line distance. It is Pythagoras in disguise — here is the formula, why it works, and a worked example that lands on exactly 10.

Circle FormulasA = πr² · C = 2πr · d = 2rArea, circumference, diameter and radius — the whole circle family, worked both ways.Slope Formulam = (y₂ − y₁) / (x₂ − x₁)Rise over run from two points, the four slope types, and the sign mistakes to avoid.Geometric Sequence Formulasaₙ = a₁·rⁿ⁻¹ · Sₙ · S∞The nth term, the finite sum and the infinite sum — each verified by direct addition.Quadratic Formulax = (−b ± √(b² − 4ac)) / 2aSolve any ax² + bx + c = 0: the formula, the discriminant, and a worked example.Midpoint FormulaM = ((x₁ + x₂) / 2, (y₁ + y₂) / 2)The point exactly halfway between two points is just the average of their coordinates.Pythagorean Theorema² + b² = c²a² + b² = c² in right triangles: check 3-4-5, find a missing leg or the hypotenuse.Area FormulasA = lw, A = ½bh, A = ((a + b) / 2)h, A = (d₁d₂) / 2Rectangle, triangle, parallelogram, trapezoid and rhombus areas on one page, with worked examples.Volume FormulasV = s³, V = πr²h, V = (4/3)πr³Cube, cuboid, cylinder, cone, sphere and triangular prism volumes, with worked examples.Exponent Formulas (Laws of Exponents)aᵐ · aⁿ = aᵐ⁺ⁿ, (aᵐ)ⁿ = aᵐⁿ, a⁻ⁿ = 1/aⁿProduct, quotient, power, zero, negative and fractional exponent rules with micro-examples.Logarithm Formulaslog_b(x) = y ⟺ bʸ = x; log_b(xy) = log_b(x) + log_b(y)Definition, product, quotient and power rules, change of base, and ln vs log₁₀ — with examples.Derivative Formulasd/dx xⁿ = n·xⁿ⁻¹Power, sum, exponential, log and trig derivative rules with a worked example.Integral Formulas∫xⁿ dx = xⁿ⁺¹/(n+1) + CPower rule, 1/x, eˣ, sin and cos antiderivatives, the + C, and definite integrals as area.Standard Deviation Formulaσ = √[ Σ(xᵢ − μ)² / N ]Population σ with N and sample s with n − 1, built on the variance, with a fully worked dataset.Probability FormulasP(E) = favourable / totalBasic probability, complement, addition and multiplication rules, permutations and combinations, with dice and counting examples.Compound Interest FormulaA = P(1 + r/n)^(nt)A = P(1 + r/n)^(nt) and continuous compounding Pe^(rt), with $1,000 at 5% for 10 years worked both ways.Simple Interest FormulaI = P · r · tI = Prt and A = P + I, with $2,000 at 6% for 4 years worked to I = $480 and A = $2,480.Arithmetic Sequence Formulasaₙ = a₁ + (n − 1)dThe nth term aₙ = a₁ + (n − 1)d and the sum Sₙ = n/2 · (a₁ + aₙ), with 3, 7, 11, … worked to a₂₀ = 79 and S₂₀ = 820.Percentage Formulas% change = (new − old) / old × 100Percent of a number, percentage change and finding the whole, plus the percentage-points trap, with worked examples.Trigonometric Ratiossin θ = opposite / hypotenusesin, cos and tan on a right triangle, the reciprocal ratios csc, sec and cot, and the exact 30°/45°/60° values.

The distance formula: d = √((x₂ − x₁)² + (y₂ − y₁)²). It gives the straight-line distance between any two points (x₁, y₁) and (x₂, y₂) in the coordinate plane. There is nothing to memorise beyond its shape: subtract the x's, subtract the y's, square both, add, and take the square root. It works for points in any position — same quadrant or different, positive coordinates or negative — because the squaring step erases every sign.

The Variables, Explained

  • (x₁, y₁) is the first point and (x₂, y₂) the second. Unlike slope, the labelling truly does not matter: swapping the points flips both differences' signs, and the squares are unchanged.
  • x₂ − x₁ is the horizontal change (the run) between the points.
  • y₂ − y₁ is the vertical change (the rise).
  • d is the distance itself — always zero or positive, never negative.

Why It Works: Pythagoras on the Legs

Plot the two points and complete a right triangle: draw a horizontal segment from the first point and a vertical segment from the second until they meet. The horizontal leg has length |x₂ − x₁| and the vertical leg |y₂ − y₁|, and the segment joining the two points is the hypotenuse. The Pythagorean theorem then says d² = (x₂ − x₁)² + (y₂ − y₁)², and taking the square root gives the distance formula. That is the whole derivation: the distance formula is not a new fact about coordinates, it is the oldest theorem in geometry applied to a grid. It also explains why the differences are squared — they are legs of a triangle — and why the final step is a root.

Worked Example: (1, 2) to (7, 10)

Horizontal change: 7 − 1 = 6. Vertical change: 10 − 2 = 8. Square and add: 6² + 8² = 36 + 64 = 100. Take the root: d = √100 = 10. Notice the 6-8-10 triangle — a scaled 3-4-5 — hiding inside the coordinates; whenever the two differences form a Pythagorean triple, the distance comes out whole. A quick sanity check: the distance must be longer than either leg alone (10 > 8 and 10 > 6 ✓) and shorter than the two legs walked together (10 < 14 ✓).

A Second Example, and the 3D Extension

From (0, 0) to (5, 12): differences 5 and 12, so d = √(25 + 144) = √169 = 13 — the 5-12-13 triple again. The same idea climbs into three dimensions by adding one more squared difference under the root: d = √((x₂ − x₁)² + (y₂ − y₁)² + (z₂ − z₁)²). From (0, 0, 0) to (2, 3, 6): d = √(4 + 9 + 36) = √49 = 7. Each new dimension adds its leg to the same Pythagorean sum, which is why surveyors, game engines and GPS software all run this one formula underneath.

Common Mistakes

  • Forgetting the final square root. 36 + 64 = 100 is d², not d. The answer is √100 = 10.
  • Adding the squares' roots instead. √(36 + 64) is not √36 + √64 = 14 — that wrong move computes the walked path, not the straight line.
  • Mixing coordinates. Each subtraction pairs like with like: x with x, y with y. (x₂ − y₁) has no meaning here.
  • Squaring a negative carelessly. (2 − 7)² = (−5)² = 25, not −25. A squared difference is never negative, so if your sum under the root is negative, a sign slipped.
  • Reporting a negative distance. Distance cannot be negative; if d comes out negative, the root step or a sign went wrong.

Check any pair of points in the distance formula calculator, read the standard treatment in OpenStax Elementary Algebra, and browse the full formulas library for more reference pages.

Frequently Asked Questions

What is the distance formula?

d = √((x₂ − x₁)² + (y₂ − y₁)²): square the horizontal and vertical changes between two points, add them, and take the square root. From (1, 2) to (7, 10): √(36 + 64) = √100 = 10.

Does it matter which point is first?

No. Swapping the points changes (x₂ − x₁) into its negative, but the square is identical, so d is the same either way.

Why is the distance formula just Pythagoras?

The two points and the corner between them form a right triangle whose legs are the x-change and y-change and whose hypotenuse is the distance. The formula is d² = leg² + leg² with the root taken.

Can the distance be zero or negative?

Zero, yes — when the two points are the same point. Negative, never: d is a square root of a sum of squares, which is always zero or positive.

What if the answer is not a whole number?

Leave it as a simplified root or round it: for (0, 0) to (1, 1), d = √2 ≈ 1.41. Most real point pairs give irrational distances, which is normal.

Related Tools & Guides