Bookmarks    
nPr and nCr    
Random Number    
SD Calculator    
Sample Size    
Percent Error    
Density    
Molarity    
Molar Mass    
Ohm's Law    
Watts to Amps    
Voltage Drop    
Long Division    
Mixed Numbers    
Rounding    
Nth Root    
Exponents    
Half-Life    
Polar Form    
De Moivre    
3D Distance    
Point to Line    
Cross Product    
Determinant    
Sin Cos Tan    
Triangle Area    
Scale Factor    
Sector Area    
Ellipse Area    
Cube Volume    
Box Volume    
Sphere Volume    
Cone Volume    
Pipe Volume    
Time Duration    
Time Card    
Present Value    
Future Value    
Churn Rate    
A/B Test Calc    
SEO Traffic    
Ideal Weight    
Fat Intake    
Child Height    
Golf Handicap    
Heat Index    
Wind Chill    
Dew Point    
Download Time    
kWh to Cost    
AC Size (BTU)    
Heating Costs    
LED Savings    
Trip Gas Cost    
Tire Size    
Solar Output    
Solar Payback    
Battery Size    
Wall Area    
Gravel Needed    
Mortar Mix    
Slope Grade    
Curtain Size    
Soil Needed    
Sod Needed    
Ramp Length    
Blind Size    
Drain Slope    
Board Feet    
Heat Loss    
Furniture Fit    
Moving Boxes    
Plywood Cuts    
Shelf Sag    
   Add
Probability and random number calculators
Independent Events
Independent Events
Two Events Solver
Two Events Solver
Repeated Trials
Repeated Trials
Bayes' Theorem
Bayes' Theorem
Expected Value
Expected Value
Binomial Distribution
Binomial Distribution
nPr and nCr
nPr and nCr
Circular Permutation
Circular Permutation
With Repetition
With Repetition
Random Number
Random Number
Averages and statistics calculators
Average Calculator
Average Calculator
Mean Median Mode
Mean Median Mode
SD Calculator
SD Calculator
Quartiles & IQR
Quartiles & IQR
Frequency Table
Frequency Table
Correlation (r)
Correlation (r)
Normal Probability
Normal Probability
Z-Score Calculator
Z-Score Calculator
Confidence Interval
Confidence Interval
Sample Size
Sample Size
Mark & Recapture
Mark & Recapture
P-Value Calculator
P-Value Calculator
Percentage and ratio calculators
Percentage Calc
Percentage Calc
Percent Change
Percent Change
Percent Difference
Percent Difference
Percent Error
Percent Error
Ratio Calculator
Ratio Calculator
Discount Calculator
Discount Calculator
Sales Tax Calculator
Sales Tax Calculator
Margin Calculator
Margin Calculator
Speed calculators
Speed Calculator
Speed Calculator
Density and concentration calculators
Density
Density
Molarity
Molarity
Molar Mass
Molar Mass
Physics and electricity calculators
Ohm's Law
Ohm's Law
Watts to Amps
Watts to Amps
Resistor Colors
Resistor Colors
Voltage Drop
Voltage Drop
Unit conversion calculators
Weight Converter
Weight Converter
Shoe Size Converter
Shoe Size Converter
Integer and signed number calculators
Long Division
Long Division
LCM Calculator
LCM Calculator
GCF Calculator
GCF Calculator
Integer Calculator
Integer Calculator
Prime Factorization
Prime Factorization
Diophantine Solver
Diophantine Solver
Modulo Calculator
Modulo Calculator
Factor Calculator
Factor Calculator
Roman Numerals
Roman Numerals
Fraction, decimal and rounding calculators
Fraction Calculator
Fraction Calculator
Mixed Numbers
Mixed Numbers
Simplify Fractions
Simplify Fractions
Fraction to Decimal
Fraction to Decimal
Decimal to Fraction
Decimal to Fraction
Rounding
Rounding
Equation and inequality calculators
Linear Equation
Linear Equation
Linear Systems
Linear Systems
Quadratic Formula
Quadratic Formula
Absolute Value
Absolute Value
Quadratic Inequality
Quadratic Inequality
Polynomial calculators
Binomial Theorem
Binomial Theorem
Square root and nth root calculators
Simplify Radicals
Simplify Radicals
Nth Root
Nth Root
Exponent and logarithm calculators
Exponents
Exponents
Log Calculator
Log Calculator
Number of Digits
Number of Digits
Scientific Notation
Scientific Notation
Sci. Notation Math
Sci. Notation Math
Half-Life
Half-Life
Complex number calculators
Complex Numbers
Complex Numbers
Polar Form
Polar Form
De Moivre
De Moivre
Function and graph calculators
Slope Calculator
Slope Calculator
Linear Function
Linear Function
Direct & Inverse Variation
Direct & Inverse Variation
y = ax² Calculator
y = ax² Calculator
Distance Formula
Distance Formula
3D Distance
3D Distance
Section Formula
Section Formula
Point to Line
Point to Line
Lat/Long Distance
Lat/Long Distance
Complete the Square
Complete the Square
Circle Equation
Circle Equation
Conic Sections
Conic Sections
Polar Coordinates
Polar Coordinates
Sequence calculators
Arithmetic Sequence
Arithmetic Sequence
Geometric Sequence
Geometric Sequence
Fibonacci Sequence
Fibonacci Sequence
Recurrence Relation
Recurrence Relation
Vector calculators
Vector Calculator
Vector Calculator
Cross Product
Cross Product
Matrix calculators
Matrix Calculator
Matrix Calculator
Determinant
Determinant
Inverse Matrix
Inverse Matrix
Plane geometry calculators
Sin Cos Tan
Sin Cos Tan
Degrees ⇔ Radians
Degrees ⇔ Radians
a sin θ + b cos θ
a sin θ + b cos θ
Triangle Solver
Triangle Solver
Triangle Area
Triangle Area
Right Triangle
Right Triangle
Pythagorean Theorem
Pythagorean Theorem
Polygon Angles
Polygon Angles
Scale Factor
Scale Factor
Parallel Lines
Parallel Lines
Rectangle Area
Rectangle Area
Parallelogram Area
Parallelogram Area
Trapezoid Area
Trapezoid Area
Circle Calculator
Circle Calculator
Sector Area
Sector Area
Inscribed Angle
Inscribed Angle
Ellipse Area
Ellipse Area
Solid geometry calculators
Cube Volume
Cube Volume
Cube Surface Area
Cube Surface Area
Box Volume
Box Volume
Box Surface Area
Box Surface Area
Cylinder Volume
Cylinder Volume
Cylinder Surface
Cylinder Surface
Sphere Volume
Sphere Volume
Sphere Surface
Sphere Surface
Spherical Cap Volume
Spherical Cap Volume
Cap Surface Area
Cap Surface Area
Ellipsoid Volume
Ellipsoid Volume
Ellipsoid Surface
Ellipsoid Surface
Pyramid Volume
Pyramid Volume
Pyramid Surface
Pyramid Surface
Cone Volume
Cone Volume
Cone Surface Area
Cone Surface Area
Frustum Volume
Frustum Volume
Frustum Surface Area
Frustum Surface Area
Pipe Volume
Pipe Volume
Capsule Volume
Capsule Volume
Capsule Surface Area
Capsule Surface Area
Date and time calculators
Age Calculator
Age Calculator
Days Between Dates
Days Between Dates
Date Calculator
Date Calculator
Hours From Now
Hours From Now
Day of the Week
Day of the Week
Time Calculator
Time Calculator
Time Zone Converter
Time Zone Converter
Hours Calculator
Hours Calculator
Time Duration
Time Duration
Time Card
Time Card
Finance and economics calculators
Compound Interest
Compound Interest
Simple Interest
Simple Interest
Interest Calculator
Interest Calculator
TVM Calculator
TVM Calculator
Present Value
Present Value
Future Value
Future Value
ROI Calculator
ROI Calculator
IRR Calculator
IRR Calculator
Payback Period
Payback Period
Average Return
Average Return
GDP Calculator
GDP Calculator
Web marketing and ad metric calculators
CTR Calculator
CTR Calculator
Conversion Rate
Conversion Rate
CPC, CPM & CPA
CPC, CPM & CPA
ROAS Calculator
ROAS Calculator
Break-Even CPA
Break-Even CPA
LTV Calculator
LTV Calculator
CAC Calculator
CAC Calculator
Churn Rate
Churn Rate
A/B Test Calc
A/B Test Calc
A/B Sample Size
A/B Sample Size
SEO Traffic
SEO Traffic
Break-Even Point
Break-Even Point
Markup vs. Margin
Markup vs. Margin
CAGR Calculator
CAGR Calculator
Health and fitness calculators
BMI Calculator
BMI Calculator
Sleep Calculator
Sleep Calculator
Calorie Calculator
Calorie Calculator
BMR Calculator
BMR Calculator
TDEE Calculator
TDEE Calculator
Ideal Weight
Ideal Weight
Body Fat Calculator
Body Fat Calculator
Lean Body Mass
Lean Body Mass
Calories Burned
Calories Burned
Protein Intake
Protein Intake
Macro Calculator
Macro Calculator
Carb Calculator
Carb Calculator
Fat Intake
Fat Intake
Child Height
Child Height
Sports calculators
Golf Handicap
Golf Handicap
Pace Calculator
Pace Calculator
1RM Calculator
1RM Calculator
Target Heart Rate
Target Heart Rate
Weather calculators
Heat Index
Heat Index
Wind Chill
Wind Chill
Dew Point
Dew Point
Computer calculators
Base Converter
Base Converter
Subnet Calculator
Subnet Calculator
Download Time
Download Time
Household energy and budget calculators
Electricity Cost
Electricity Cost
kWh to Cost
kWh to Cost
Yearly kWh to Cost
Yearly kWh to Cost
AC Size (BTU)
AC Size (BTU)
AC Running Cost
AC Running Cost
Heating Costs
Heating Costs
Gas vs Electric
Gas vs Electric
LED Savings
LED Savings
Salary Calculator
Salary Calculator
Budget Calculator
Budget Calculator
Car calculators
Trip Gas Cost
Trip Gas Cost
EV Charging Cost
EV Charging Cost
EV vs Gas Cost
EV vs Gas Cost
MPG Calculator
MPG Calculator
Tire Size
Tire Size
Solar power and battery calculators
Solar Output
Solar Output
Solar Panel Count
Solar Panel Count
Solar Payback
Solar Payback
Battery Size
Battery Size
Home and DIY calculators
Tile Calculator
Tile Calculator
Stair Calculator
Stair Calculator
Concrete Volume
Concrete Volume
Wall Area
Wall Area
Wallpaper Rolls
Wallpaper Rolls
Paint Calculator
Paint Calculator
Flooring Needed
Flooring Needed
Exterior Walls
Exterior Walls
Gravel Needed
Gravel Needed
Mortar Mix
Mortar Mix
Slope Grade
Slope Grade
Lumber Cut List
Lumber Cut List
Lot Coverage/FAR
Lot Coverage/FAR
Sheet Vinyl Roll
Sheet Vinyl Roll
Insulation Needed
Insulation Needed
Curtain Size
Curtain Size
TV Size & Distance
TV Size & Distance
Soil Needed
Soil Needed
Sod Needed
Sod Needed
Block Calculator
Block Calculator
Brick Calculator
Brick Calculator
Deck Materials
Deck Materials
Ramp Length
Ramp Length
Pilot Hole Size
Pilot Hole Size
Room Ventilation
Room Ventilation
Paint Thinning
Paint Thinning
Baseboard & Trim
Baseboard & Trim
Blind Size
Blind Size
Picture Hanging
Picture Hanging
Drain Slope
Drain Slope
Screw Calculator
Screw Calculator
Board Feet
Board Feet
Fence Calculator
Fence Calculator
Wood Shrinkage
Wood Shrinkage
Caulk Calculator
Caulk Calculator
Heat Loss
Heat Loss
Furniture Fit
Furniture Fit
Moving Boxes
Moving Boxes
Storage Capacity
Storage Capacity
Plywood Cuts
Plywood Cuts
Shelf Sag
Shelf Sag

Logarithm Calculator (Log Calculator)

Of the three values in "y = log_a(x)" (base a, argument x and log value y), enter the two you know and press "Calculate". The one left blank is calculated. The equation below is linked to the fields, so you can also type the base, argument or log value right into it.

Leave the value you want to find blank (enter exactly two). Besides numbers, the base can be "e" for the natural logarithm (use 10 for the common logarithm). The argument must be greater than 0, and the base must be greater than 0 and not 1.
Result
Enter two values in the fields on the left and press "Calculate". The result will appear here.

What you can do on this page

  • For the logarithm \(y = \log_a x\), enter the two you know out of the base \(a\), the argument \(x\) and the log value \(y\), and the third appears on the spot
  • You can use any base. Enter "10" as the base for the common logarithm, or "e" for the natural logarithm (\(\ln\))
  • Besides log values like \(\log_2 8 = 3\), it also answers "what is 2 to the 10th power?" (solve for the argument, \(2^{10} = 1024\)) and "what number to the 4th power is 81?" (solve for the base)
  • A plain-language explanation of the formulas and copy-and-paste formulas for Excel, Google Sheets and Python are all on this page
A logarithm has two rules. The argument must be greater than 0 (the domain), and the base must be greater than 0 and not equal to 1 (the base restrictions). Input that breaks these rules gives an error.

What is this calculation used for?

What decibels (dB) really are (audio and noise)

The decibel, the unit of loudness, is defined with the common logarithm of a ratio of sound energies. Even when the energy becomes 100 times larger, the level rises by only \(10 \times \log_{10} 100 = 20\) dB.
Our ears sense sound by "how many times louder", so a logarithmic unit fits them perfectly. Safe listening levels for earbuds and workplace noise guidelines (NIOSH recommends no more than 8 hours a day at 85 dB) are all built on this logarithm formula.

Reading earthquake magnitudes correctly (disaster safety)

Magnitude is based on the logarithm of an earthquake's energy. One step up in magnitude releases about 32 times (\(10^{1.5}\) times) the energy, so a magnitude 7 earthquake has about 1000 times the energy of a magnitude 5.
Knowing logarithms lets you read this as "3 more digits of energy", not "only 2 more", and that directly shapes how you prepare for disasters.

pH (acidic or basic) is a logarithmic scale (science and daily life)

pH, which measures how acidic a solution is, is defined with the common logarithm of the hydrogen ion concentration (\(\mathrm{pH} = -\log_{10}[\mathrm{H}^+]\)). Between lemon juice at pH 2 and water at pH 7, the concentration differs not by "5" but by a factor of \(10^5\) (100,000).
Turning quantities that span many powers of ten into easy numbers from about 0 to 14 is what logarithms do best. The pH numbers on cleaners, pool test kits and garden soil tests all rely on it.

How many years it takes to double your money (compound interest and investing)

At 3% interest compounded yearly, your money doubles when \(1.03^y = 2\), so \(y = \log_{1.03} 2 \approx 23.4\) years (assuming the same return every year).
The well-known "rule of 72" (72 ÷ interest rate in % ≈ years to double) is actually an approximation of this logarithm. It is a solid base for long-term money plans such as college savings and retirement, with numbers instead of guesses.

Bits of data are set by logarithms (IT)

The number of bits needed to tell \(n\) different things apart is \(\log_2 n\). For example, 256 different values fit in \(\log_2 256 = 8\) bits (1 byte).
Password strength (roughly how many guesses a brute-force attack needs) is also measured as "how many bits", a logarithm. This calculation supports the whole digital world.

Musical intervals are logarithms of frequency (music)

Neighboring piano keys (a half step) all have the same frequency ratio, \(2^{1/12} \approx 1.0595\) (equal temperament). If the frequency ratio of two notes is \(r\), the number of half steps between them is \(12 \times \log_2 r\).
For the A at 440 Hz and the A at 880 Hz, that is \(12 \times \log_2 2 = 12\) half steps, exactly one octave. Instrument tuners and pitch shifting in music software run on this logarithm.

Formula

Definition of a logarithm (what \(y = \log_a x\) says)
Standard notation (the usual math form)
\(x\) \(=\) \(a\) \(y\)
In words (symbols replaced with words)
③ \(x\): argument \(=\) ① \(a\): base ② \(y\): log value
The formula in words
① Raise the \(a\): base
② to the power of the \(y\): log value
③ and you get the \(x\): argument . This "what power" number \(y\) is written as \(y = \log_a x\)
Quick example
Rewriting "2 to the 3rd power is 8" (2 × 2 × 2 = 8) as a logarithm gives
argument 8 \(=\) base 2 log value 3
\(2^{3} = 2 \times 2 \times 2 = 8\)
\(\log_{2} 8 = 3\)
Key idea
A logarithm undoes a power (an exponent). If "what is \(2^3\)?" has the answer 8, then "2 to what power is 8?" has the answer \(\log_2 8 = 3\). The same equation also finds the argument: if you know the base and the log value, the argument is \(x = a^y\). Any power of a positive number \(a\) is always positive, so the argument \(x\) must be greater than 0 (the domain of a logarithm). Also, any power of 1 is still 1, so 1 cannot be a base, and neither can 0 or a negative number (the base must be greater than 0 and not 1).
Finding the log value (change of base formula)
Standard notation (the usual math form)
\(\log_{a} x\) \(=\) \(\ln x\) \(\div\) \(\ln a\)
In words (symbols replaced with words)
③ \(\log_a x\): log value to find \(=\) ① \(\ln x\): natural log of the argument \(\div\) ② \(\ln a\): natural log of the base
The formula in words
① Take the \(\ln x\): natural log of the argument
② divide it by the \(\ln a\): natural log of the base
③ and you get the \(\log_a x\): log value to find
Quick example
The log of 8 with base 2 (2 to what power is 8) is
log value \(\log_2 8\) \(=\) natural log of 8 \(\ln 8\) \(\div\) natural log of 2 \(\ln 2\)
\(\log_{2} 8 = \ln 8 \div \ln 2 = 2.0794\cdots \div 0.6931\cdots = 3\)
Key idea
Calculators and programming languages usually offer only the natural logarithm \(\ln\) (base \(e\)) and the common logarithm \(\log_{10}\) (base 10). A logarithm with any base can be found as "log of the argument ÷ log of the base". This is the change of base formula, and this calculator uses it internally. Using the common logarithm instead of the natural logarithm gives the same answer (\(\log_a x = \log_{10} x \div \log_{10} a\)). The only rule is to use the same kind of logarithm on the top and the bottom.
Finding the base (from the argument and the log value)
Standard notation (the usual math form)
\(a\) \(=\) \(x\) \(1/y\)
In words (symbols replaced with words)
③ \(a\): base \(=\) ① \(x\): argument ② \(1/y\): 1 over the log value
The formula in words
① Raise the \(x\): argument
② to the power \(1/y\): 1 over the log value (that is, take the \(y\)th root)
③ and you get the \(a\): base
Quick example
"The number whose 4th power is 81" (the base when the argument is 81 and the log value is 4) is
\(a\): base \(=\) argument 81 one fourth
\(a = 81^{1/4} = \sqrt[4]{81} = 3\)
\(3 \times 3 \times 3 \times 3 = 81\)
Key idea
"Raising to the power \(\frac{1}{y}\)" is the same as "taking the \(y\)th root" (finding the number whose \(y\)th power is that number). This formula does not work when the log value is \(y = 0\) (any number to the power 0 is 1, so if the argument is 1 every base works and the base is not unique, and if the argument is not 1 there is no base), or when the argument is \(x = 1\) (the base would have to be 1, which is not allowed). This calculator gives an error in those cases.
Product rule (the log of a product is a sum)
Standard notation (the usual math form)
\(\log_{a} MN\) \(=\) \(\log_{a} M\) \(+\) \(\log_{a} N\)
In words (symbols replaced with words)
③ \(\log_a MN\): log of the product \(MN\) \(=\) ① \(\log_a M\): log of \(M\) \(+\) ② \(\log_a N\): log of \(N\)
The formula in words
① Add the \(\log_a M\): log of \(M\)
② and the \(\log_a N\): log of \(N\)
③ and you get the \(\log_a MN\): log of the product \(MN\)
Quick example
With base 10, the log of the product of 4 and 25 (4 × 25 = 100) is
log of the product 4 × 25 \(=\) log of 4 (about 0.6021) \(+\) log of 25 (about 1.3979)
\(\log_{10}(4 \times 25) = \log_{10} 4 + \log_{10} 25 \approx 0.6021 + 1.3979 = 2\)
\(\log_{10} 100 = 2\)
Key idea
Taking logarithms turns multiplication into addition. This is the most important property of logarithms. Before calculators, astronomers used tables of logarithms to turn the multiplication of huge numbers into addition. The slide rule works on the same principle.
Quotient rule (the log of a quotient is a difference)
Standard notation (the usual math form)
\(\log_{a} \dfrac{M}{N}\) \(=\) \(\log_{a} M\) \(-\) \(\log_{a} N\)
In words (symbols replaced with words)
③ \(\log_a \frac{M}{N}\): log of the quotient \(\frac{M}{N}\) \(=\) ① \(\log_a M\): log of \(M\) \(-\) ② \(\log_a N\): log of \(N\)
The formula in words
① From the \(\log_a M\): log of \(M\)
② subtract the \(\log_a N\): log of \(N\)
③ and you get the \(\log_a \frac{M}{N}\): log of the quotient \(\frac{M}{N}\)
Quick example
With base 10, the log of the quotient of 1000 divided by 10 (1000 ÷ 10 = 100) is
log of the quotient 1000 ÷ 10 \(=\) log of 1000 (3) \(-\) log of 10 (1)
\(\log_{10}\dfrac{1000}{10} = \log_{10} 1000 - \log_{10} 10 = 3 - 1 = 2\)
\(\log_{10} 100 = 2\)
Key idea
This is the "division version" of the product rule. For the same reason that multiplication turns into addition, division turns into subtraction. It is easy to remember as the exponent rule \(a^{m} \div a^{n} = a^{m-n}\) restated in the language of logarithms.
Power rule (the exponent moves to the front)
Standard notation (the usual math form)
\(\log_{a} M^{k}\) \(=\) \(k\) \(\times\) \(\log_{a} M\)
In words (symbols replaced with words)
③ \(\log_a M^k\): log of the power \(M^k\) \(=\) ① \(k\): exponent \(\times\) ② \(\log_a M\): log of \(M\)
The formula in words
① Multiply the \(k\): exponent
② by the \(\log_a M\): log of \(M\)
③ and you get the \(\log_a M^k\): log of the power \(M^k\)
Quick example
With base 10, the log of 2 to the 10th power (\(2^{10} = 1024\)) is
log of \(2^{10}\) \(=\) exponent 10 \(\times\) log of 2 (about 0.3010)
\(\log_{10} 2^{10} = 10 \times \log_{10} 2 \approx 10 \times 0.3010 = 3.010\)
\(\log_{10} 1024 \approx 3.010\)
Key idea
The log of a power (multiplying \(k\) times) turns into a single multiplication: \(k\) times the log. In this example, \(\log_{10} 2^{10} \approx 3.010\) tells you that "\(2^{10}\) is about \(10^{3.010}\) in size", which fits perfectly with \(2^{10} = 1024\) having 4 digits (the whole-number part of the common logarithm plus 1 is the number of digits). Questions like "how many digits does \(2^{100}\) have?" are solved with this rule.
The logarithm \(y = \log_a x\) is the number that tells "the base \(a\) to what power gives the argument \(x\)". It is exactly the reverse of a power. With the change of base formula, a logarithm with any base can be calculated from the natural logarithm \(\ln\) or the common logarithm \(\log_{10}\).

Symbols and terms

Symbols

\(\log_a x\) log base a of x "The logarithm of \(x\) with base \(a\)". The number that tells what power of the base \(a\) gives the argument \(x\). (Example - \(\log_2 8 = 3\))
\(a\) a (the base) The number the logarithm is built on, written small below the line in \(\log_a x\). It must be greater than 0 and not 1.
\(x\) x (the argument) The number inside the log. It must be greater than 0 (the domain).
\(y\) y (the log value) The result of the logarithm. It is the exponent itself: "the base to the power \(y\) gives the argument".
\(\log_{10} x\) log base 10 of x (common log) The logarithm with base 10. It is tied directly to the number of digits (\(\log_{10} 1000 = 3\)) and is widely used in science and engineering. Often the base is left out and it is written \(\log x\).
\(\ln x\) natural log of x The logarithm with base \(e\) (Euler's number). It works best with calculus and is standard in math, physics and finance.
\(e\) e (Euler's number) A special number, about 2.71828…, whose digits go on forever. It is the base of the natural logarithm. On this calculator, enter "e" in the base field to use it.
\(M,\ N\) M, N Arguments used to explain the log rules (product, quotient and power). Both are greater than 0.
\(\sqrt[n]{x}\) the nth root of x The number whose \(n\)th power is \(x\). It is the same as \(x^{1/n}\) (the power 1 over \(n\)). (Example - \(\sqrt[4]{81} = 3\))

Terms

logarithm (log) The number that tells what power of the base gives the argument. It is the reverse of a power and is taught in Algebra 2. The symbol log is short for logarithm.
base The number the logarithm is built on. In \(\log_2 8\), the base is 2. Only numbers greater than 0 and not equal to 1 can be a base.
argument The number inside the log. In \(\log_2 8\), the argument is 8. Only numbers greater than 0 can be an argument.
domain The set of numbers a logarithm accepts. The argument must be greater than 0, because any power of a positive number is always positive, so there is no log of 0 or of a negative number. It is the first thing to check when you solve equations or inequalities with logarithms.
base restrictions The rule that the base must be greater than 0 and not equal to 1. Any power of 1 is still 1, so the logarithm would not be defined, and powers of 0 or of a negative number are not defined for every exponent.
common logarithm (common log) The logarithm with base 10. It is tied directly to the number of digits, and most logarithms in everyday life, such as pH, decibels and earthquake magnitude, are common logarithms.
natural logarithm (natural log) The logarithm with base \(e\) (about 2.718). Its symbol is \(\ln\). It is the easiest logarithm to use in calculus and is used for interest calculations and for studying natural processes.
Euler's number The number \(e = 2.71828\ldots\), whose digits go on forever. It appears naturally whenever there is continuous growth. Like \(\pi\), it is a famous irrational number.
power Multiplying the same number by itself several times. As in \(2^3 = 2 \times 2 \times 2\), the small number at the upper right (the exponent) tells how many times. A logarithm is the reverse of a power.
exponent The small number at the upper right of a power that tells what power to raise to. In \(2^3\), the exponent is 3. A log value is the exponent you are looking for.
change of base formula The formula that rewrites a logarithm with any base as "log of the argument ÷ log of the base". Even if a calculator or program has only \(\ln\) and \(\log_{10}\), this formula lets you calculate a logarithm with any base.
root (nth root) The number whose \(n\)th power is the given number. As in "the number whose 4th power is 81 is 3", solving for the base is finding this root.

Good to know before you start

Here is what helps you use the calculation on this page with real understanding, not just by pressing the button.
If you get stuck, going back to these topics is the fastest way forward.

Powers and exponents (Grade 6)
  • Knowing that the small number at the upper right (the exponent) is "how many times to multiply", as in \(2^3 = 2 \times 2 \times 2 = 8\)
Extending exponents (Grade 8 and Algebra 2)
  • Knowing that exponents extend to 0 and negative numbers, as in \(a^0 = 1\) and \(a^{-n} = \frac{1}{a^n}\)
  • Knowing that \(a^{1/n}\) (the power 1 over \(n\)) is the same as taking the \(n\)th root
Square roots and nth roots (Grade 8 to Algebra 2)
  • Being able to answer a power question in reverse, such as "the positive number whose square is 9 is 3"
The idea of inverse operations (elementary and middle school)
  • Seeing that a logarithm undoes a power, just as division undoes multiplication

How to calculate it in Excel

Copy the whole table below and paste it into cell A1 in Excel. It works as is.
Table to find the log value y
Argument x 100
Base a 10
Log value y =LOG(B1,B2)
Table to find the argument x
Base a 2
Log value y 10
Argument x =B1^B2
Table to find the base a
Argument x 81
Log value y 4
Base a =B1^(1/B2)
Table to check the product rule
Argument M 4
Argument N 25
log M + log N (base 10) =LOG(B1,10)+LOG(B2,10)
log of the product M×N (base 10) =LOG(B1*B2,10)
Table to check the quotient rule
Argument M 1000
Argument N 10
log M − log N (base 10) =LOG(B1,10)-LOG(B2,10)
log of the quotient M÷N (base 10) =LOG(B1/B2,10)
Table to check the power rule
Argument M 2
Exponent k 10
k × (log M) (base 10) =B2*LOG(B1,10)
log of the power M^k (base 10) =LOG(B1^B2,10)
After pasting, the upper rows are your inputs, and the last rows (the green formulas) show the results calculated automatically.
The Excel LOG function is written as "=LOG(number, base)" (if you leave out the base, it uses the common logarithm, base 10). The natural logarithm (base e) is "=LN(number)".
In the first table, for example, B3 shows 2 (because 10 to the 2nd power is 100). To calculate a natural logarithm, change B3 in the first table to "=LN(B1)".
The fourth to sixth tables check the log rules. The two formulas at the bottom always give the same value.

How to calculate it in Google Sheets

Copy the whole table below and paste it into cell A1 in Google Sheets. It works as is.
Table to find the log value y
Argument x 100
Base a 10
Log value y =LOG(B1,B2)
Table to find the argument x
Base a 2
Log value y 10
Argument x =B1^B2
Table to find the base a
Argument x 81
Log value y 4
Base a =B1^(1/B2)
Table to check the product rule
Argument M 4
Argument N 25
log M + log N (base 10) =LOG(B1,10)+LOG(B2,10)
log of the product M×N (base 10) =LOG(B1*B2,10)
Table to check the quotient rule
Argument M 1000
Argument N 10
log M − log N (base 10) =LOG(B1,10)-LOG(B2,10)
log of the quotient M÷N (base 10) =LOG(B1/B2,10)
Table to check the power rule
Argument M 2
Exponent k 10
k × (log M) (base 10) =B2*LOG(B1,10)
log of the power M^k (base 10) =LOG(B1^B2,10)
Google Sheets has the same LOG and LN functions as Excel, so exactly the same formulas work.
Copy the whole table, paste it into cell A1, and replace the input numbers with your own.

How to calculate it in Python

import math

x = 100   # argument (a number greater than 0)
a = 10    # base (greater than 0 and not 1; use math.e for the natural log)

y = math.log(x, a)   # log value y = log_a(x)
print(f"Log of {x} with base {a}: {y}")

# The common log (base 10) and natural log (base e) also have their own functions
print(f"Common log log10({x}) = {math.log10(x)}")
print(f"Natural log ln({x}) = {math.log(x)}")

# You can also work backward
true_number = a ** y        # find the argument (raise the base to the power y)
base_number = x ** (1 / y)  # find the base (raise the argument to the power 1/y)
print(f"Argument: {true_number}, base: {base_number}")
Runs with only the math module from the standard library. math.log(argument, base) gives the log value (if you leave out the base, it gives the natural logarithm). Change x and a at the top to your own numbers and run it.

How to write it in LaTeX and other math languages (copy and paste)

Definition of a logarithm (what \(y = \log_a x\) says)
y = logₐ x ⇔ x = aʸ
y = \log_{a} x \iff x = a^{y}
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <mi>y</mi>
    <mo>=</mo>
    <msub><mi>log</mi><mi>a</mi></msub>
    <mi>x</mi>
    <mo>&#x21D4;</mo>
    <mi>x</mi>
    <mo>=</mo>
    <msup><mi>a</mi><mi>y</mi></msup>
  </mrow>
</math>
y = log_a x iff x = a^y
Log[a, x]
y := log[a](x);
y = log(x)/log(a);
y = log_a(x)
Finding the log value (change of base formula)
logₐ x = ln x ÷ ln a
\log_{a} x = \dfrac{\ln x}{\ln a}
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <msub><mi>log</mi><mi>a</mi></msub>
    <mi>x</mi>
    <mo>=</mo>
    <mfrac>
      <mrow><mi>ln</mi><mo>&#x2061;</mo><mi>x</mi></mrow>
      <mrow><mi>ln</mi><mo>&#x2061;</mo><mi>a</mi></mrow>
    </mfrac>
  </mrow>
</math>
log_a x = (ln x)/(ln a)
Log[x]/Log[a]
y := ln(x)/ln(a);
y = log(x)/log(a);
log_a(x) = ln(x)/ln(a)
Finding the base (from the argument and the log value)
a = x^{1/y}
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <mi>a</mi>
    <mo>=</mo>
    <msup>
      <mi>x</mi>
      <mrow><mn>1</mn><mo>/</mo><mi>y</mi></mrow>
    </msup>
  </mrow>
</math>
a = x^(1/y)
x^(1/y)
a := x^(1/y);
a = x^(1/y);
a = x^(1/y)
Product rule (the log of a product is a sum)
logₐ(MN) = logₐ M + logₐ N
\log_{a} MN = \log_{a} M + \log_{a} N
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <msub><mi>log</mi><mi>a</mi></msub>
    <mrow><mi>M</mi><mi>N</mi></mrow>
    <mo>=</mo>
    <msub><mi>log</mi><mi>a</mi></msub>
    <mi>M</mi>
    <mo>+</mo>
    <msub><mi>log</mi><mi>a</mi></msub>
    <mi>N</mi>
  </mrow>
</math>
log_a (MN) = log_a M + log_a N
Log[a, M*n] == Log[a, M] + Log[a, n]  (* N (numerical evaluation) is a reserved word in Mathematica, so n is used instead *)
log[a](M*N) = log[a](M) + log[a](N);
log(M*N)/log(a) == log(M)/log(a) + log(N)/log(a)
log_a(MN) = log_a(M) + log_a(N)
Quotient rule (the log of a quotient is a difference)
logₐ(M ÷ N) = logₐ M − logₐ N
\log_{a} \dfrac{M}{N} = \log_{a} M - \log_{a} N
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <msub><mi>log</mi><mi>a</mi></msub>
    <mfrac><mi>M</mi><mi>N</mi></mfrac>
    <mo>=</mo>
    <msub><mi>log</mi><mi>a</mi></msub>
    <mi>M</mi>
    <mo>&#x2212;</mo>
    <msub><mi>log</mi><mi>a</mi></msub>
    <mi>N</mi>
  </mrow>
</math>
log_a (M/N) = log_a M - log_a N
Log[a, M/n] == Log[a, M] - Log[a, n]  (* N (numerical evaluation) is a reserved word in Mathematica, so n is used instead *)
log[a](M/N) = log[a](M) - log[a](N);
log(M/N)/log(a) == log(M)/log(a) - log(N)/log(a)
log_a(M/N) = log_a(M) - log_a(N)
Power rule (the exponent moves to the front)
logₐ(Mᵏ) = k logₐ M
\log_{a} M^{k} = k \log_{a} M
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <msub><mi>log</mi><mi>a</mi></msub>
    <msup><mi>M</mi><mi>k</mi></msup>
    <mo>=</mo>
    <mi>k</mi>
    <msub><mi>log</mi><mi>a</mi></msub>
    <mi>M</mi>
  </mrow>
</math>
log_a (M^k) = k log_a M
Log[a, M^k] == k*Log[a, M]
log[a](M^k) = k*log[a](M);
log(M^k)/log(a) == k*log(M)/log(a)
log_a(M^k) = k log_a(M)

How to have ChatGPT  do the calculation

You are a calculation assistant for logarithms. Do the following calculations by actually running Python code, and base your answer only on the numbers from the execution result (do not answer by mental math or guessing).

Find each of the following:
1. The log of 100 with base 10 (log10(100))
2. The natural log of 7 (ln 7)
3. The argument when the base is 2 and the log value is 10 (2 to the 10th power)
4. The number whose 4th power is 81 (the base when the argument is 81 and the log value is 4)

Show the formulas you used and the numbers from the execution result.

How to Use
  1. 1
    Enter your numbers
    Type the numbers you want to calculate with into the input fields
  2. 2
    Calculate
    Press the "Calculate" button
  3. 3
    Check the result
    The result appears on the spot. The same page also explains the idea behind the calculation and the formula
  DataChef Features
Easy and Free
Unlimited conversions for free.
No technical knowledge required.
Intuitive and user-friendly operation.
No Registration Required
Available immediately after access.
Can be used without registering personal information.
Safe and Secure
Fully SSL encrypted communication.
Automatic file deletion by clicking "download".
Fast
High-speed site access
and rapid file conversion.
No Watermark
No watermark.
No attribution required.
Commercial Use Available
Free for commercial use.
No need to contact us for commercial use permission.