How to Do Antilog in Excel [6 Easy Ways]
Logarithms are used to express a number as an exponent of another number.
The number of times a number appears in a number after being multiplied by itself is known as the log of a number. The base of the logarithm is the number that is multiplied repeatedly.
For example, you need to know the log value of the number 1000 to base 10, 𝒍𝒐𝒈10(1000). You have to find how many times the number 10 needs to multiply itself to get 1000.
10 x 10 x 10 = 1000, so 3 is the log base 10 value of the number 1000.
Exponents or antilogarithms are numbers that show how many times a number has been multiplied by itself. It is typically written to the right of the base number as a superscript number.
For example, the number 10 to the power of 3 (103) is written as 1000, which is the result of 10 multiplied by itself 3 times.
A logarithm and an exponential or antilogarithm are related in that the logarithm of a number is the exponent to which another fixed number, the base, must be raised to produce that number.
Where x is a natural number, b is the base, and y is a log value of a number x for the base b.
This blog post explains to you how to find the antilog or exponent of a log value using Carat Operator, Excel in-built functions Power function, Exponent function for Natural Logarithm, and Power query feature. If you need to compute antilog in your automation, look at the VBA code or Office Scripts.
Get your copy of the example workbook used in this post to follow along!
What is Antilog?
An antilog is the inverse of a logarithm. The antilog is also known as an antilogarithm, an inverse logarithm, or exponentiation.
where b is the base; y is the log value
Common logarithm Base 10
Log base 10 is the most common logarithm and is denoted by log10(x) or log(x).
It is typically used in engineering and scientific applications, such as in calculations involving exponential growth or decay.
For example, find the log value of 1000
Log base 10 of 1000 is 3. 10 to the 3rd power is 1000.
The log base 10 of 1 is 0. Any number raised to the 0th power is 1.
= LOG10(B6)
Use the excel LOG10 function to find the log value of the number 1000.
In this example, the number 1000 is stored in cell B6 and the log function refers the cell B6. You have used the LOG10, which is the common logarithm function base 10 in Excel.
You can use the LOG function to find the common log value by inputting the base value.
LOG (number, [base])
, 10 is the default value for the base. For example, LOG (B6)
or LOG (B6, 10)
. 10 is the base value.
Natural Logarithm Base e
Natural logarithm is a logarithm to the base e. e is also known as Euler’s number or Euler’s constant, which is a mathematical constant approximately equal to 2.71828.
It is denoted by loge(x) or ln(x).
The natural logarithm of a number is the exponent to which the base e must be raised to get that number.
For example, loge(2) = 0.6931; Antilog or exponent is e0.6931=2
=LN(P6)
Use the excel LN function to find the log value of the number 2.
In this example, the number 2 is stored in cell P6 and the log function refers the cell P6. You have used the LN, which is the natural logarithm function base e in Excel.
Use the LOG function in excel to find the Natural log value. Eg. LOG (P6, 2.718)
, 2.718 is the base e value.
Do Antilog with the Carat Operator
The Carat Symbol operator ^
is used to calculate exponentials.
In finance, the Carat Symbol operator is frequently used to determine the amount of interest earned on a loan or investment.
=10^C6
The above formula refers to cell C6 common log value of the number 1000. The log value in cell C6 is a common logarithm so you used the base 10 in the formula to get the antilog.
Do Antilog with the POWER Function
The Excel POWER function is one of the basic functions. It can be used in a variety of calculations in excel reports or dashboards along with other functions.
This function calculates the value of a number raised to a given power.
POWER (number, power)
= POWER (10, C6)
Type the above formula to calculate the antilog of the common log value in cell C6.
You assigned the base 10 to the number parameter and referred the log value cell C6 to the power argument.
Do Antilog with the EXP Function for Natural Logarithm
The Excel EXP function is a Mathematical function, used in financial and statistical applications.
It returns the value of the Euler’s number or Euler’s constant e (2.7182) raised to a power.
EXP( number )
The number
argument is either a numeric value or a cell reference.
= EXP ( Q6 )
Type the above formula to calculate the antilog of the natural log value in cell Q6 0.693147, which is the natural logarithm of number 2.
You passed the natural logarithm value in cell Q6 to the EXP function number argument.
Do Antilog with Power Query
Power Query is an excel tool, you can use to access, shape, and transform data.
Also you may connect to numerous data sources, clean up their data, and then alter it before loading it into Excel for further analysis.
It offers a user-friendly GUI that enables users to carry out difficult data mining and data analysis activities.
Please follow the below steps to calculate antilog with Power Query.
Convert the range of cells to an excel table.
- Select the range of cells C5:C6.
- Go to Insert and Press Table to popup Create Table dialog box.
- Press OK.
- Go to the Data tab.
- Choose From Table/Range to open the Power Query editor.
- Click Custom Column in the Add Column menu
- Type the New Column Name Power Query.
- Enter the below formula in the Custom column formula box
Number.Power (10, [Log Value])
. This uses the POWER function in the POWER QUERY function list. - Press OK.
- Select the column Log Value.
- Click the Right mouse button and Press Remove.
- Go to Home, Press Close & Load to to popup the Import Data dialog box.
- Select the option Existing worksheet.
- Enter the cell reference =$D$5 in the input box.
- Press OK.
Use Number.Exp()
function instead in step 8, if you need to calculate the antilog for the natural logarithm. Enter the below formula in the Custom column formula box Number.Exp ([Log Value])
.
Do Antilog with VBA
Excel VBA is a programming language for automation that is based on Visual Basic. Use Macro Recorder to record a macro. Macro is a set of commands you or another user can repeat.
In the VBE you can create unique macros, user interfaces, and functions as well as carry out repetitive operations. In this session you learn how to use the excel power function in VBA, to calculate the antilog value of the current cell.
Sub DoAntiLog()
‘Declaring variables
Dim baseVal As Integer
Dim rg As Range
Dim logVal As Double
Dim antiLogVal As Double
'Assign base value to the variable baseVal
baseVal = 10
For Each rg In Selection
'Assign cell value to the variable logVal
logVal = rg.Value
'Compute antilog using excel POWER function
antiLogVal = WorksheetFunction.Power(baseVal, logVal)
'Compute antilog using excel EXP function
'antiLogVal = Exp(logVal)
'Paste the antilog of the cell value to the adjacent cell
rg.Offset(0, 1).Value = antiLogVal
Next
End Sub
Copy and paste the above code into your VBA Module.
This DoAntiLog Macro code assigns the base 10 to the variable baseVal.
This reads the selected range of cells one by one and assigned the cell value to the variable logVal.
It computes the antilog of the logVal number using the excel power function and assigned it to the variable antiLogVal. Paste it to the next column in the same row.
You can update the variable baseVal if you have a different base.
antiLogVal = Exp(logVal)
Suppose you want to report the antilog of natural logarithm value, use the EXP function instead of POWER by replacing the above code in your script.
Do Antilog with Office Scripts
You can write scripts using Office Scripts in Excel for the web to automate a variety of functions, including repetitive tasks, producing charts, formatting cells, and more.
You can record the steps and debug them. Office Scripts are kept in the cloud, so updating any of your workbooks is simple.
function main(workbook: ExcelScript.Workbook) {
let baseVal = 10;
//getselected range
let rng = workbook.getSelectedRange();
let rows = rng.getRowCount();
//Assign base value to the variable baseVal
baseVal = 10
for (let i = 0; i < rows; i++) {
// Assign cell value to the variable logVal
let logVal = rng.getCell(i, 0).getValue() as number;
//Compute antilog using excel POWER function
let antiLogVal = Math.pow(baseVal, logVal);
//Compute antilog using excel EXP function for Natural logarithm
//let antiLogVal = Math.exp(logVal)
//Paste the antilog of the cell value to the adjacent cell
rng.getCell(i, 1).setValue(antiLogVal);
}
}
DoAntiLog Office Scripts assigning the base 10 to the variable baseVal.
Read the selected range of cells one by one, and assigned the cell value to the variable logVal. Compute the antilog of the logVal number using the Power function Math.pow()
and assigned it to the variable antiLogVal. Paste it to the next column in the same row.
You can update the variable baseVal if you have a different base.
let antiLogVal = Math.exp(logVal)
Suppose you want to report antilog of natural logarithm value, use the exp() function instead of pow() by replacing the above code in your script.
Conclusions
You have learned the mathematical functions common logarithm and natural logarithm that are used to solve complex equations and excel in-built functions Power, Exp, and Carat Operator to calculate the Antilog.
Use the Excel Power function to calculate the Antilog or inverse of any given common logarithm value. Exp function to calculate for natural logarithm value.
The Power Query method helps you to add a new column in your data set for antilog. You can add VBA and Office scripts code in your automation or user interface button to do antilog.
Do you have any other method to do Antilog in Microsoft Excel? Let me know in the comments section!