What's the Distance Formula?

••• forrest9/iStock/GettyImages

Distance is an important concept both in mathematics and the real world. Of course, measuring real-world distances is typically easier than distances in math; all that you have to do is use a tool like a ruler or odometer to get the actual distance measurement. Given that scales can vary, however, the same technique won't work when measuring distances mathematically. The formula used to calculate distance depends on whether you're measuring distance over time or a distance between two points on a plane.

Distance Over Time

If you need to calculate the distance between two locations while traveling, this means you're calculating distance over time. The calculation assumes that you're moving at a constant rate and that your movement will occur over a set period of time. If you know these two elements, the distance traveled over that period of time is simply a matter of multiplying the two.

Distance Over Time Formula

The formula to calculate distance over a period of time is :


To give an example of this, if you're traveling 60 miles per hour (mph) and drive for two and a half hours (2.5 h), you can calculate the distance traveled as:

\text{distance}=60\times25=150\text{ miles}

This gives a total distance of 150 miles (since miles per hour is essentially a fraction of m/h and hours can be shown as a fraction of h/1, the two time factors cancel out and leave only miles). You can also use this formula to calculate rate or time as needed, transforming it to:


for whichever calculation you need.

Distance Between Points

If you're working on a two-dimensional graph, the distance formula is a bit different. Since neither time nor rate are involved in static graphs, you'll instead need to calculate the distance between two points based on their x and y coordinates. The formula here is actually based on the Pythagorean Theorem, as you're essentially calculating one side of a triangle based on its two corner points. You'll take the differences between the x coordinates and between the y coordinates, then square those results and add them. The square root of your final result is the distance between those points.

Distance Between Points Formula

The formula for this calculation is:


where the first point is represented by (x1,y1), and the second point is represented by (x2,y2). To give an example, say you're trying to find the distance between the points (1,3) and (4,4). Putting those numbers in the formula, you have:


The distance ends up being √10, which works out to around 3.16.

Related Articles

What is Speed?
How to Calculate the Distance, Rate and Time
Endpoint Math Formula
How to Calculate the Midpoint Between Two Numbers
How to Find a Distance From Velocity & Time
How to Calculate Acceleration
How to Calculate Cooling Rate
How to Find the Radius of an Ellipse
How to Calculate Tangential Speed
How to Calculate the Area of a Curved Surface
How to Convert Hours & Minutes to Decimals
How to Find the Area of Squares
Does Mahi Mahi Have Fins & Scales?
How to Calculate Gear Ratio
How to Calculate Feet Per Second
How to Find Euclidean Distance
How to Find the Y-Intercept of a Circle
What Are Vertices in Math?
How to Calculate Wheel Circumference
How to Find Slope With Two Coordinates

Dont Go!

We Have More Great Sciencing Articles!