Have you ever wished to know how to measure the **distance **between two points or between cities? Have you ever been curious about the distance definition, or what is the distance formula? All of these questions and more are answered through this **Distance Calculator**, as well as a full explanation of how to determine the distance between any two objects.

If you want to know more about time, driving time, time zones, visit our home page, and search for a Time Unit Converter. Also, our math category is quite interesting, and you can learn more about Complementary Angles, Octagon or Natural Log Calculator, Also, you will learn about **trigonometric functions** and their use in geometry, 45 45 90 triangle calculator, 30 60 90 triangle calculator and search for our Cofunction Calculator for further uses.

Take a look other related calculators, such as:

- Phase shift calculator
- Power reducing formula calculator
- Probability calculator 3 events
- Sum and difference identities calculator
- Trigonometry calculator
- Fundamental counting principle calculator
- Condensing logarithms calculator
- Population density calculator

## Distance – Definition

Before we go into how to find distances, it’s probably a good idea to define what a distance is, the distance definition. We all meet and have contact with the concept of distance, whether we go from home to work, school, etc. But even though we have contact with it, do we know what distance is? The 1D gap between two locations is the **most** typical interpretation. This definition is one method to express what virtually all of us intuitively think of when we think about distance, but it is not the only way to discuss distance. In the next sections, you’ll learn how the idea of distance may be stretched beyond **length**, which is the breakthrough underlying Einstein’s theory of relativity in more ways than one.

Even if we keep to the geometrical definition of distance, we must still specify the type of space we are dealing with. Most of the time, you’re probably talking about **three dimensions **or fewer because that’s all our brains can handle without bursting. Therefore, only the 2D distance is considered in this calculation (with the 1D included as a special case).

## Distance Formula

Learn how to find the distance between two locations using the **distance formula**, which is a Pythagorean theorem application. To get the distance between any two points, rephrase the Pythagorean theorem as

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

## Euclidean Distance

Before receiving extensive mathematical instruction in any of these features, we all think of 2D space as **Euclidean space **or Euclidean geometry. For example, in Euclidean space, the sum of a triangle’s angles equals 180 degrees, while squares have all of angles equal to 90 degrees. We all take this for granted, yet that isn’t the case everywhere. It’s also important not to mix together Euclidean and multidimensional spaces. Euclidean space can contain as many **dimensions** as you like, as long as they are all finite and follow Euclidean laws.

### Math space

Mathematicians use the term **flat space** to describe both the Euclidean and Minkowski spaces. This implies that space has flat qualities; for instance, the shortest distance between any two places is always a straight line. On the other hand, curved spaces are mathematical spaces in which the space is fundamentally curved and the shortest distance between two locations is not a straight line. In 3D, this curved space is difficult to visualize, but in 2D, we may imagine a 2D space that is curved in the shape of a sphere’s surface instead of a flat plane area. Strange things happen in this situation.

For example, because any line in this space is curved owing to the intrinsic curvature of the space (Earth), the shortest distance between two points is not a straight line. Another odd property of this space is that some parallel lines do intersect at some point. For example, consider the so-called lines of longitude, which split the Earth into various time zones and intersect at the poles to help you grasp it.

It’s vital to understand that this is NOT the same as a change of coordinates. We are still in Euclidean space whether we transform conventional *x*, *y*, and *z* coordinates to polar, cylindrical, or even spherical coordinates. In terms of intrinsic qualities, we’re talking about a fundamentally different space when we talk about curved space. Even though it is difficult to represent in numbers, a straight line can still exist in spherical coordinates, and distance can still be in a straight line.

### Euclidean distance equation

Returning to Euclidean space, we can now provide you with the distance equation that we mentioned earlier. The distance equation is as follows:

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

The Pythagorean theorem states that *a² + b² = c²*. The hypotenuse is *c*, while the legs of a right triangle are *a* and *b*. Assume that two locations, (*x₁*, *y₁*) and (*x₂*, *y₂*), are the coordinates of the hypotenuse’s ends. The distance equation part (*x₂* – *x₁*)² relates to *a²* and (*y₂* – *y₁*)² corresponds to *b²*. You can see why c = \sqrt {a^2 + 2} is essentially an extension of the Pythagorean theorem.

The segment addition postulate, which entails calculating a segment length when three points are collinear, is an expanded application of the distance between points. For better understanding of this term, check our Segment Addition Postulate Calculator.

## Haversine and Lambert’s Distance Formula

Given their latitude and longitude, the **Haversine formula** may be useful to find the distance between two points on a sphere:

d=2\cdot r \cdot \sin^{-1} \left ( \sqrt {\sin^{2}(\frac{\phi_1-\phi_2}{2})+ \cos(\phi_1) \cdot \cos(\phi_2) \cdot \sin^{2}(\frac{\lambda_2-\lambda_1}{2})} \right )

In the Haversine formula, *d* is the distance between two locations on a great circle, *r* is the sphere’s radius, ** ϕ1 **and

**are the two points’ latitudes, and**

*ϕ2***and**

*λ1***are the two points’ longitudes, all in radians.**

*λ2***The Haversine formula** calculates the great-circle distance between latitude and longitude locations on a sphere, which may be used to estimate distance on Earth (since it is mostly spherical). A sphere’s great circle (also orthodrome) is the greatest circle that may be made on any sphere. It is made up of the intersection of a plane and a sphere at the sphere’s center point. The shortest distance between two places on the surface of a sphere is the great-circle distance.

Because the Earth is not a perfect sphere, but an ellipsoid with a radius of 6,378 km (3,963 mi) at the equator and 6,357 km (3,950 mi) at a pole, results utilizing the Haversine formula may have an error of up to 0.5 percent. Lambert’s formula (an ellipsoidal-surface formula) approximates the Earth’s surface more exactly than the Haversine formula (a spherical-surface formula).

### Lambert’s formula

The method used to compute the shortest distance over the surface of an ellipsoid is Lambert’s formula. It has an accuracy on the order of 10 meters across thousands of kilometers when used to approximate the Earth and compute distances on the Earth’s surface, which is more exact than the Haversine formula.

The formula devised by **Lambert **is as follows:

d=a\cdot(\sigma-\frac{f}{2}\cdot(X+Y))

where ** a **is the ellipsoid’s (in this case, the Earth’s) equatorial radius,

**is the central angle in radians between the latitude and longitude points,**

*σ***is the Earth’s flattening, and below is explanation for**

*f***and**

*X***.**

*Y*X=(\sigma- \sin(\sigma))\cdot\frac{\sin^{2}(P) \cdot \cos^{2}(Q)}{\cos^{2}(\frac{\sigma}{2})}

Y=(\sigma+\sin(\sigma))\cdot\frac{\cos^{2}(P) \cdot \sin^{2}(Q)}{\sin^{2}(\frac{\sigma}{2})}

Where P = (\beta_1 + \beta_2)/2 \; \text {and} \; Q = (\beta_2 - \beta_1)/2 are the prime numbers.

Using the equation below, 1 and 1 are lowered latitudes in the formulas above:

\tan(\beta) = \frac {1-f} {\tan(\phi)}

where *ϕ* is the point’s latitude.

Because it is impossible to account for every irregularity on the Earth’s surface, neither the haversine formula nor Lambert’s formula offers an accurate distance.

## Distance Between a Point and a Continuous Object

The distance formula we just saw is the typical Euclidean distance formula, however, it might seem a little limiting when you think about it. We don’t always want to determine the shortest distance between two places. Sometimes we need to know how far a point is from a line or a circle. In these circumstances, we must first choose which point on the line or circumference will be useful to find the distance, and then apply the distance formula.

This is where the idea of a perpendicular line comes into play. **Perpendicularity **is useful to describe the distance between a point and a continuous object. In terms of geometry, the first step in measuring the distance between two locations is to draw a straight line between them and then measure the length of that segment. When we measure the distance between a point and a line, we must decide on one of the many potential lines to draw. The line from the point perpendicular to the first line is the solution in this situation. In the scenario when the point is a part of the line, this distance will be 0. Because the line represents the whole 1D space, we can only analyze the distance between points in these 1D scenarios.

This has implications for how to **compute **distances in a number of fascinating geometrical situations. For example, the height of a triangle may be redefined as the distance between one vertex and the opposite side. Because the area is a function of the triangle’s height, the triangle’s area is also redefined in terms of distance in this scenario.

## Distance Between the Earth and Moon

When looking at a distance within our planet, it’s difficult to travel far without running into certain issues, ranging from the intrinsic curvature of this space (due to the non-zero Earth curvature) to the restricted maximum distance between two places on the Earth. Many people are **curious **in distances in the cosmos because of this and the fact that there is an entire universe beyond Earth. However, because we don’t have a proper means of interplanetary, let alone interstellar travel. Let’s concentrate on the real Euclidean distance to certain astronomical objects for the time being. For example, the distance between the Earth and the **Sun **or the **Earth **and the **Moon**.

We can’t even fathom the enormity of our globe, let alone the huge, limitless cosmos. Because this is so difficult, we must employ scientific notation or light-years as a unit of measurement for such great distances. For example, the longest voyages on Earth are just a few thousand kilometers long. Yet the distance between Earth and the Moon (distance to Moon), the nearest celestial object to us, is 384,000 kilometers. Furthermore, the distance between Earth and our nearest star, the Sun, is 150,000,000 km. Or a little more than 8 light minutes.

When we compare these distances to the distance to our second nearest star *(Alpha Centauri)*, which is 4 light-years, they appear to be considerably smaller. If we want to make an even more ludicrous comparison, consider a journey from New York to Sydney. Which generally takes more than 20 hours and is just around 16,000 kilometers long. And compare it to the size of the observable universe, which is approximately 46,600,000,000 light-years!

## Distance Beyond Length

The term *“distance”* usually refers to the geometric Euclidean distance and it is in association with length. However, you may broaden the definition of distance to include only the difference between two items. That opens up a whole new universe of possibilities. Suddenly, one can determine the optimal method for determining the distance between two objects. And also expressing it in terms of the most helpful quantity. For example, thinking about the distance between two numbers. This is nothing more than the 1D difference between these numbers, is a fairly basic step to take. To get it, we just subtract one from the other, and the difference, also known as the distance, is the outcome.

We may change this numerical distance to, say, difference or distance in terms of % difference, which could give a better comparison in some circumstances. We don’t have to stick to percentages; change percentages to fractions if you think fractions are the best method to convey distance. However, there is still only one level of abstraction, in which the units of measurement are simply removed. But what if we used a combination of various units?

We may find the difference between two temperatures in degrees or thermal energy. Or any related variable like pressure, by expanding the idea of the distance to imply something closer to the difference. But, without going too far. Consider how two locations might be different by a different distance depending on the assumptions made. Returning to the driving distance example, we might quantify the journey’s distance in time rather than length. In this scenario, we’ll need to make an assumption to enable such translation: the mode of transportation.

The time it takes to go 10 kilometers by airline versus automobile, or by car against the bike, is vastly different. However, there are occasions when the assumption is explicit and implicit. Such as when we measure the lightning distance in time and subsequently convert it to length. This raises an intriguing point: speed or velocity is the conversion factor between distances in time and length. True, this speed does not have to be constant, as accelerated movements such as free fall under gravitational force. Or the one that relates stopping time and stopping distance via breaking force and drag. Or, in extreme circumstances, by the force of a vehicle impact.

In **solid-state physics**, we also can find a strange unit of distance. Where the distance a particle travels inside material is frequently also known as an average of interactions or collisions. The mean free route, which is the average distance (in length) a particle travels between interactions, is used to relate this distance to length.

## Distance Calculator – How to Calculate Distance?

Using this calculator has never been easier. No more flipping through the page to page of books and searching for formulas. When you enter the calculator you must first choose what type you want and dimensions. After that, fill in the fields of the distance calculator with the information you have.

- Choose the type of distance
- From the dropdown menu choose the dimension of space
- Enter coordinates of points, and/or line equation based on the previous choice
- Get your results
- Turn on the advanced mode to see step by step distance calculation.

## Distance Calculator – Example

For our example we will take 2 points type and 2D dimension. In addition, as we said, we only fill in the blanks with numbers known to us. We will take for *x₁*= 15, *x₂*= 19, *y₁*= 2, *y₂*= 6. Furthermore, as we said, the calculator does the calculation itself and we get the solution 5.65685.

**Step by step procedure is available in advanced mode as in the picture bellow:**

## Distance Calculator – Real-world Application

Let’s have a look at one of the distance calculator’s uses. It may be useful in conjunction with the petrol calculator to plan road trips. For example, you have a map plan. Assume you’re going between cities A (it can be your home) and B with only one stop in city C. Your route A to B is perpendicular to your route B to C. We may use the gas calculator to find the distance between points A and B. As well as the cost of gasoline, the amount of fuel consumed, and the cost per passenger while traveling.

The issue here is precisely calculating the distances between cities. A straight line can be a decent approximation. But it can be far off if the path you’re traveling is not direct and instead takes a detour, perhaps to avoid mountains or pass through another city. Use Google maps or any other tool that calculates the distance along a path rather than the distance between two points.

Our **Distance Calculator** can provide accurate measurements and forecasts when measuring distances between objects. Beside this tool, there is also a useful tool for everyday life situations and that is our Manhattan Distance Calculator. Our Three-Dimensional Distance tool is something you might also be interested in.

## FAQ

### How to find the distance between two points?

We’ll use the distance formula: \sqrt{(x_2-x_1)^{2}+(y_2-y_1)^{2}} to find the distance between two points.

– Obtain the spatial coordinates of both locations.

– Subtract the x-coordinates of one location from the y-coordinates of another.

– Add the values you acquired in the previous step to the squares you got in the previous step.

– Find the square root of the above result.

### How to calculate map distance between two genes?

Count the number of SCO and DCO events and use the following formula to find the map distance between two loci [the most common error is to ignore the DCO classes].

(bÛc) Map distance = 24.7 m.u. + 15.8 m.u. = 40.5 m.u

### How to calculate pupillary distance?

With both eyes open, face your companion and stare straight ahead. Ask a buddy to hold the ruler up to your right, so the zero ends is aligned with your pupil. Next, find the distance between your right and left pupils. Your PD is the number that lines up with your left pupil.

### How to calculate lightning distance?

The distance in miles to the lightning may be calculated by counting the number of seconds between the flash of lightning and the sound of thunder. Divide that value by 5. 5 seconds = 1 mile, 15 seconds = 3 miles, and 0 seconds = extremely near. Keep in mind that you should count in a secure location.

### How to calculate distance between two latitudes and longitude?

To do so, multiply each places’ longitude and latitude values by 180/pi. Pi has a value of 22/7. 180/pi has a value of roughly 57.29577951. Use the value 3.963, which is the radius of the Earth, to determine the distance between two points in miles.