Calculate the antilogarithm (inverse logarithm) of a number.
Your antilog result will appear here.
Understanding Antilogarithms
The antilogarithm, often denoted as antilog(y) or 10^y (for base 10), is the inverse operation of the logarithm. If the logarithm of a number x to a base b is y (i.e., log_b(x) = y), then the antilogarithm of y to the base b is x (i.e., antilog_b(y) = x).
Essentially, if you know the result of a logarithm (the exponent, y) and the base (b), the antilogarithm helps you find the original number (x).
The fundamental relationship is:
If log_b(x) = y, then x = b^y.
This calculator computes b^y given b and y.
Common Bases:
Base 10 (Common Logarithm): When the base is 10, the antilog is simply 10^y. This is frequently encountered in scientific and engineering fields. For example, the pH scale and Richter scale use base-10 logarithms.
Base e (Natural Logarithm): When the base is the mathematical constant 'e' (approximately 2.71828), the antilog is e^y, also known as the exponential function. This is fundamental in calculus, finance (continuous compounding), and many areas of physics and biology.
Base 2 (Binary Logarithm): Used in computer science and information theory, the antilog is 2^y.
How this Calculator Works:
This calculator takes two inputs:
Base (b): The base of the logarithm you are inverting.
Exponent (y): The result of the logarithm (the number whose antilog you want to find).
It then calculates b raised to the power of y (b^y) and displays the result.
Examples:
Common Logarithm Example:
If you know that log10(1000) = 3, you can use the antilog to find 1000 by calculating the antilog of 3 with base 10.
Input Base: 10
Input Exponent: 3
Calculation: 10^3
Result: 1000
Natural Logarithm Example:
If ln(x) = 2, then x = e^2.
Input Base: 2.71828 (approximately e)
Input Exponent: 2
Calculation: 2.71828^2
Result: Approximately 7.389
Binary Logarithm Example:
If log2(8) = 3, then the antilog of 3 with base 2 is 8.
Input Base: 2
Input Exponent: 3
Calculation: 2^3
Result: 8
function calculateAntilog() {
var baseInput = document.getElementById("base");
var exponentInput = document.getElementById("exponent");
var resultDiv = document.getElementById("result");
var base = parseFloat(baseInput.value);
var exponent = parseFloat(exponentInput.value);
if (isNaN(base) || isNaN(exponent)) {
resultDiv.textContent = "Please enter valid numbers for base and exponent.";
resultDiv.style.backgroundColor = "#dc3545"; // Red for error
return;
}
if (base <= 0) {
resultDiv.textContent = "Base must be a positive number.";
resultDiv.style.backgroundColor = "#dc3545"; // Red for error
return;
}
// For common log, base is 10
if (base === 10) {
var antilogResult = Math.pow(10, exponent);
resultDiv.textContent = "Antilog (base 10) of " + exponent + " is: " + antilogResult.toFixed(6);
}
// For natural log, base is e
else if (base === Math.E) {
var antilogResult = Math.pow(Math.E, exponent);
resultDiv.textContent = "Antilog (base e) of " + exponent + " is: " + antilogResult.toFixed(6);
}
// For other bases
else {
var antilogResult = Math.pow(base, exponent);
resultDiv.textContent = "Antilog (base " + base + ") of " + exponent + " is: " + antilogResult.toFixed(6);
}
resultDiv.style.backgroundColor = "var(–success-green)"; // Reset to green on success
}