How to Calculate Log Base 2 in Excel (2 Handy Methods)

Get FREE Advanced Excel Exercises with Solutions!

The LOG function in Excel is very simple and easy to use. It is the most frequent function in finance, business analytics, and statistics. You can also this LOG function to plot a chart or graph. In this article, you will learn 2 methods to calculate log base 2 in Excel.


Download Practice Workbook

You can download the following practice workbook that we have used to prepare this article.


What Is Logarithm (Log) in Mathematics?

In mathematics, the logarithm is the reverse operation of the exponentiation. In simple words, the logarithm value of a given number is the index to which we need to raise the base to find that number. To give you an idea, for a given number 64, 6 is the index to which base 2 should be raised to find the number 64. Therefore, a LOG of 64 is 6. In mathematics, we write it as log264=6.


2 Methods to Calculate Log Base 2 in Excel

1. Use Excel LOG Function

The LOG function in Excel computes the logarithm of a number to a particular base. In order to use the LOG function, just select a cell and type it as the image shown below.

Use LOG Function

To find log base 2 in excel, just follow the steps below.

📌 Steps:

  • First, select an output cell (In this example, D5) where we want to compute the logarithm value. Then, type the following formula, and finally press ENTER.
=LOG(B5,C5)

Use LOG Function to Calculate Log Base 2 in Excel

Finally, here is the result.

Use LOG Function to Calculate Log Base 2 in Excel

Read More: How to Calculate Natural Logarithm in Excel (With 4 Examples)


Similar Readings


2. Apply VBA to Calculate Log Base 2

If you are comfortable with the VBA codes, then you can use the Log function in VBA to calculate log base 2 in Excel. Follow the steps below to apply VBA Log Function.

📌 Steps:

  • To open a module window, go to Developer tab >> Visual Basic >> Insert >> Module. A module window will pop up.

Apply VBA Log Function

  • Now, type the following code in the module window.
Function LogRND(N As Double, X As Double) As Double
LogRND = Log(X) / Log(N)
End Function
Sub Log_N_Based()
MsgBox LogRND(2, 1000)
End Sub

Apply VBA Log Function to Calculate Log Base 2 in Excel

Here is the pop-up that shows the result.

Apply VBA Log Function

Read More: How to Calculate Logarithmic Growth in Excel (2 Easy Methods)


Conclusion

In this tutorial, I have discussed 2 methods to calculate log base 2 in Excel. I hope you found this article helpful. You can visit our website ExcelDemy to learn more Excel-related content. Please, drop comments, suggestions, or queries if you have any in the comment section below.


Related Articles

Hafiz Islam
Hafiz Islam

Hi there. I am Hafiz, graduated from BUET. Currently, I am working and doing research on Microsoft Excel and here I will be posting articles related to this. Now you can see my articles in the ExcelDemy blog.

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo