Excel is like a Swiss army knife for calculations.
From mathematical to financial, it’s for every single thing you need to calculate.
You can calculate simple to most complex things in Excel.
Take an example of a SQUARE ROOT.
A square root is a quite common calculation which we do in our day to day work, and in Excel, you can calculate it with ease.
You know what?
I have found that there are five different ways to calculate a square root in Excel. Yes, five different methods, which you can use in different situations.
And today in this post, I’d like to share with you these five simple methods to find a square root of a number in Excel.
So let’s learn this thing…
What's a SQUARE Root?
Top 5 Ways to Calculate SQUARE Root in Excel
As I said, we can use 5 different ways for the calculation of square root according to the need or personal preference.
Not all the methods are the same but useful.
#1. Use SQRT Function to find the SQUARE Root of a Number
If you need to use only one method for calculating square root, SQRT function is that one. It’s a specific function to do this.
You just simply need to refer to a cell or specify a number.
Where the number is the number or cell reference which contains the number for which you want to find the square root.
In the below example, we have the number 625 in the cell A1. So, to calculate square root for this we can insert below formula into B1.
The value it has returned is 25 which is the square root of 625.
As you see, SQRT is simple to use and easy to apply.
But there’s a kicker.
If you have a negative number like below then it will return a #NUM!.
So the solution to this problem is to use ABS function along with SQRT. Here’s an example:
When we use ABS it converts a number into an absolute number. That means a converts a negative number into a positive.
2. Calculate SQUARE Root of a Number Using POWER Function
Another way to calculate a square root is by using the POWER function.
POWER function has more power than SQRT as it returns the result of a number raised Nth to a given power.
Where the number is the number or cell’s reference which contains the number for which you want to find the square root and power is the Exponent to raise power too.
Let’s say we need to find the square root of a number from cell A1 (that’s 625) then we can use 1/2 as power argument in this function.
And, the formula would be:
As you see it returns 25 in the result which is the square root of 625.
3. Apply an Exponent Formula to Get SQUARE root of a Number
If we need to insert a simple formula (other than above two methods) to calculate a square root then we can use a simple formula using exponent operator.
This formula is just like POWER. The only difference is instead of the function we need to use an exponent operator.
In the above formula, A1 in the cell where we have a number for which we need to find the square root and then we have used an exponent operator and then (1/2) for raise to power.
The best benefit of this formula is its application. Apart from the square root, we can use it to calculate cube root or any nth root.
4. A VBA Code to Show the SQUARE Root of a Number
Let’s me tell you about a different scenario where we need to check the square root of a number instead of a calculating it in a cell.
Below is a VBA code which returns the square root when we select a cell and run this code.
Dim rng As Range
Dim sqr As Long
If Application.Selection.Cells.Count > 1 Then
MsgBox "Please select only one cell", vbOKOnly, "Error"
Set rng = ActiveCell
If IsNumeric(rng) = True Then
sqr = rng ^ (1 / 2)
MsgBox "The Square Root of " & rng & " is " & sqr, vbOKOnly, "Square Root Value"
MsgBox "Please select a numeric value", vbOKOnly, "Error"
How this code works
By using below code we can check to enter a square root of a number without having the actual number in a cell.
Dim sq As Long
Dim sqr As Long
sq = InputBox("Enter the value to calculate square root", "Calculate Square Root")
If IsNumeric(sq) = True Then
sqr = sq ^ (1 / 2)
MsgBox "The Square Root of " & sq & " is " & sqr, vbOKOnly, "Square Root Value"
MsgBox "Please enter a number.", vbOKOnly, "Error"
How this code works
When we run this code it shows us an input box asking for the number for which we need to get the square root.
And when we enter that number, it calculates the square root for that numbers and shows a message box with the square root.
You can use any of the above code which is perfect for you.
#5. Using Power Query to Convert Numbers into SQUARE Roots
Note: Using power query for square root is a dynamic method, every time when you enter a new value in your table it will return the square root of that number.
Now, follow these simple steps.
- First of all, select any cell from the table and go to Data Tab ➜ Get & Transform Data and click on From Table/Range.
- Once you click on it, Excel opens the power query editor and add that table into it.
- From here we need to create a new column with square root values and for this go to Add Column tab and click on Custom Column.
- At this point, we have Custom Column window opened and in this window, we need to add the following:
- First of all, enter the column name “Square Root” in the column name input box.
- After that, enter below formula in the custom column formula input box and click OK.
- Now we have a new column with square roots of the number we have in the first column.
- From here, you need to delete the first column of original values. So, right click on it and click remove.
- After that, go to the home tab and click on close and load too.
- Here you get a window to load data. First of all, select the existing worksheet and add range B1. Second, tick mark "Add to the Data Model".
As I said, this table is dynamic.
When you enter a new value in the original data table it calculates it’s square root automatically in your new table when you refresh it.
And, we are not using any type of formula here.
[Bonus Tip] How to Add SQUARE Root Symbol in Excel
Once you calculate a square root from a number, the next thing you can do is to add a square root symbol.
And for this, we have two different ways which we can use.
#1. Using a Shortcut Key
A simple way to add a square root symbol is the shortcut key and the shortcut is Alt + 251.
You need to hold down the Alt key as you type 251 on the numeric keypad. and once you release the Alt key, and the symbol appears.
#2. Add a SQUARE Root Symbol by Applying Custom Formatting
This is the most effective way to add a symbol.
All you need to do is, select all the cells, open custom formatting option and add formatting into the formatting input bar.
In the end, click OK.
#3. VBA to Add a Square Symbol
You can also use below VBA code to apply a custom formatting to all the cells in the selection.
Selection.NumberFormat = ChrW(8730) & "General"
Note: The benefit of using #2 and #3 method is you don’t need to add a symbol to all the cells one by one and