Excel Formulas to Calculate the Distance in 2D ~ Quick Solutions!!
Tags: excelformula, excelformulas
Published: 2021-07-01 11:53:00

---
title: Excel Formulas to Calculate the Distance in 2D ~ Quick Solutions!!
published: true
date: 2021-06-27 15:41:07 UTC
tags: ExcelFormula,Excelformulas
canonical_url: https://geekexcel.com/excel-formulas-to-calculate-the-distance-in-2d/
---

Have you ever tried to find out the length of a 2D line using the given coordinates of two points on the line? In this chapter, we will show the formulas to **calculate the 2d length in Excel using the distance formula**. Let’s get into this article!! Get an official version of ** MS Excel**  from the following link: [https://www.microsoft.com/en-in/microsoft-365/excel](https://www.microsoft.com/en-in/microsoft-365/excel)

[![Distance formula](https://geekexcel.com/wp-content/uploads/2021/06/Distance-formula.png)](https://geekexcel.com/excel-formulas-to-calculate-the-distance-in-2d/distance-formula/#main)<figcaption id="caption-attachment-48002">Distance formula</figcaption>

## Generic Formula:

- If you want to calculate the 2d length of a line, you can use the below distance formula.

**=[SQRT](https://geekexcel.com/how-to-use-excel-sqrt-function-in-office-365-with-examples/)((x2-x1)^2+(y2-y1)^2)**

## Syntax Explanations:

- **SQRT** – In Excel, the [**SQRT function**](https://geekexcel.com/how-to-use-excel-sqrt-function-in-office-365-with-examples/) helps to return the square root of a positive integer.
- **X1** – It represents the x-axis point of one side.
- **Y1** – It specifies the y-axis point of one side.
- **X2** – It represents the x-axis point of another side.
- **Y2** – It represents the y-axis point of another side.
- **Plus operator (+)** – This symbol is used to add the values.
- **Minus Operator (-)** – This symbol will help to subtract any two values.
- **Parenthesis ()** – The main purpose of this symbol is to group the elements.

## Practical Example:

Refer to the below example image.

- First, we will enter the input values in **Column B** to **Column E**.
- Here we need to find out the length of the 2d line.

![Input Ranges](https://geekexcel.com/wp-content/uploads/2021/06/Input-Ranges-75.png)<figcaption id="caption-attachment-47999">Input Ranges</figcaption>

- Select any cell and type the above-given formula.

![Enter the formula](https://geekexcel.com/wp-content/uploads/2021/06/Enter-the-formula-89.png)<figcaption id="caption-attachment-47998">Enter the formula</figcaption>

- Finally, press the ** ENTER**  key, you can get the result as shown below.

![Result](https://geekexcel.com/wp-content/uploads/2021/06/Result-75.png)<figcaption id="caption-attachment-48000">Result</figcaption>

## Verdict:

Here we have described the formulas to **calculate the 2d length of a line in Excel using the distance formula**. Hope you like this article. If you have any other **ideas** or **questions,** share them with us here in the **comments** section below.

Thank you so much for visiting  **[Geek Excel](https://geekexcel.com/)!! **If you want to learn more helpful formulas, check out [**Excel Formulas**](https://geekexcel.com/excel-formula/) **!! **

### Read Also:

- **[Excel Formulas to Calculate the Circumference of a Circle ~ Easily!!](https://geekexcel.com/excel-formulas-to-calculate-the-circumference-of-a-circle/)**
- **[How to Insert a Date or Formatted Date in Excel Office 365?](https://geekexcel.com/how-to-insert-a-date-or-formatted-date-in-excel-office-365/)**
- **[Excel Formulas to Calculate the Area of a Parallelogram ~ Quickly!!](https://geekexcel.com/excel-formulas-to-calculate-the-area-of-a-parallelogram/)**
- **[Excel Formulas to Calculate the Area of a Triangle ~ Useful Tips!!](https://geekexcel.com/excel-formulas-to-calculate-the-area-of-a-triangle/)**