Logarithm
Calculate logarithms in any base
Choose the logarithm base
Must be greater than 0
Logarithms: The Inverse of Exponents
If exponents are about growing fast, logarithms are about figuring out how long it took to grow. A logarithm answers the question: "What exponent turns this base into this number?" If you know that 2 to the 3rd power is 8, then the logarithm base 2 of 8 is 3, because 3 is the exponent that turns 2 into 8. Logarithms were invented in the 1600s to make huge calculations easier, and they are still essential today in science, engineering, music, and technology.
Our calculator computes logarithms in any base, converts between bases, and evaluates natural logarithms and common logarithms instantly. Enter the number and the base, and get the result with step-by-step explanations.
The basic idea: Log base b of x equals y means b to the y power equals x. Log base 2 of 16 = 4 because 2 to the 4th power = 16. Log base 10 of 1,000 = 3 because 10 to the 3rd power = 1,000. Log base 3 of 81 = 4 because 3 to the 4th power = 81. Logarithms and exponents are two sides of the same coin, each one undoing what the other does.
The Two Most Important Bases
Base 10 (common logarithm): Written as log without a subscript, this is the logarithm most people use. It answers the question: "How many factors of 10 does this number have?" Log of 100 = 2, log of 1,000 = 3, log of 10,000 = 4. The Richter scale for earthquakes, the pH scale for acidity, and the decibel scale for sound all use base-10 logarithms to compress enormous ranges into manageable numbers.
Base e (natural logarithm): Written as ln, this uses the special number e (approximately 2.71828). Natural logarithms appear everywhere in calculus, physics, and growth models because e is the natural base for continuous growth. Population growth, radioactive decay, compound interest, and cooling curves all involve natural logarithms. If you study science or engineering in college, ln will become one of your most-used tools.
Why two bases? Base 10 is convenient for humans because we count in tens. Base e is convenient for nature because it describes continuous, smooth growth. A savings account growing continuously uses base e. An earthquake scale designed for human understanding uses base 10. Each base has its natural domain, and being fluent in both makes you powerful in both everyday calculations and advanced science.
Logarithms in the Real World
The Richter scale: An earthquake measuring 6.0 on the Richter scale is not twice as powerful as a 3.0; it is 1,000 times more powerful. Each whole-number increase represents a tenfold increase in amplitude and roughly 31.6 times more energy. A magnitude 9.0 earthquake (like the one in Japan in 2011) is 10,000 times more powerful than a magnitude 5.0. Logarithms let us express this enormous range with simple numbers from 1 to 10.
pH scale: The pH of a substance measures its acidity on a scale of 0 to 14, and it is a base-10 logarithm. A pH of 4 is 10 times more acidic than a pH of 5, and 100 times more acidic than a pH of 6. Lemon juice has a pH of about 2 (very acidic), pure water is 7 (neutral), and bleach is about 12.5 (very basic). Without logarithms, we would need huge numbers to describe acidity differences.
Decibels for sound: A normal conversation is about 60 decibels. A rock concert is about 120 decibels. Because the decibel scale is logarithmic, the concert is not twice as loud; it is roughly a trillion times more intense in terms of sound energy. A whisper at 30 dB is 1,000 times less intense than normal conversation. This compression of a massive range into small numbers is exactly what logarithms do best.
Logarithm Rules and Properties
The product rule: Log of (a times b) = log of a + log of b. This rule turns multiplication into addition, which is much easier. Before calculators, scientists used enormous books of logarithm tables to multiply huge numbers by adding their logs and then converting back. This single rule saved countless hours of tedious arithmetic.
The quotient rule: Log of (a divided by b) = log of a minus log of b. Similarly, division becomes subtraction. The power rule: log of (a to the r) = r times log of a. These three rules let you simplify complicated logarithmic expressions into manageable pieces, and they are the foundation for solving logarithmic equations.
Change of base formula: To compute a logarithm in any base using a calculator that only has base 10 and base e, use: log base b of x = ln(x) / ln(b). For example, log base 2 of 50 = ln(50) / ln(2) = about 3.912 / 0.693 = about 5.644. This formula is essential because calculators typically only have log (base 10) and ln (base e) buttons, but you might need logarithms in other bases.
Why Logarithms Matter
They make the incomprehensible comprehensible. The human brain struggles to grasp the difference between a million, a billion, and a trillion. But on a logarithmic scale, these are just 6, 9, and 12. Logarithms let us visualize and compare numbers that span many orders of magnitude, from the size of an atom to the size of the universe, from a whisper to a supernova.
They are essential for algorithms. Computer scientists measure algorithm efficiency using logarithms. A binary search through a sorted list of 1 million items takes only about 20 steps (log base 2 of 1,000,000 is about 20). An unsorted search might take all 1 million steps. This dramatic speedup, expressed as O(log n), is one of the most important concepts in computer science and explains why your phone can search through millions of contacts instantly.
They describe how we perceive the world. Human perception is roughly logarithmic. The difference between 1 watt and 2 watts of light seems much bigger than the difference between 100 watts and 101 watts, even though both are a 1-watt change. Musical pitch is perceived logarithmically: each octave doubles the frequency, but we hear them as equally spaced steps. Our senses naturally compress large ranges using the same math as logarithms.
Frequently Asked Questions
A logarithm answers the question: how many times do I need to multiply a base number to get another number? For example, log base 2 of 8 equals 3, because 2 x 2 x 2 = 8. It is the opposite of an exponent. If exponents ask what is 2 to the 3rd power (answer: 8), logarithms ask 2 to what power equals 8 (answer: 3).
Log base 10 (written log or log10) uses 10 as the base. Natural log (written ln) uses a special number called e (about 2.718) as the base. Base 10 is common in everyday measurements like pH and sound levels. Natural log appears in science, finance, and calculus because the number e has special mathematical properties that make calculations cleaner.
Logarithms turn multiplication into addition and division into subtraction, which makes complex calculations much easier. They compress large ranges into manageable numbers. The Richter scale for earthquakes, the pH scale for acidity, and decibels for sound all use logarithms because they deal with enormous ranges. A 7.0 earthquake is not just a little stronger than a 6.0, it is 10 times stronger.
Logarithms of zero and negative numbers do not exist in real numbers. There is no number of times you can multiply any positive base and get zero or a negative result. No matter how many times you multiply 10 by itself, you can never reach zero. The graph of a logarithm gets closer and closer to zero but never touches or crosses the y-axis.
Logarithms shrink enormous ranges into small, manageable numbers. The number of atoms in the observable universe is about 10 to the 80th power, but its logarithm is just 80. This compression lets scientists, engineers, and financial analysts work with numbers that would otherwise be impossible to write out or compare directly.
The change of base formula lets you calculate a logarithm with any base using a calculator that only has base 10 or natural log. The formula is log base b of x = ln(x) / ln(b). So log base 2 of 16 = ln(16) / ln(2) = 2.773 / 0.693 = 4. Our calculator handles any base automatically, so you do not need to do this conversion yourself.
The pH scale measures acidity using logarithms (each unit is 10 times more acidic). Sound is measured in decibels, a logarithmic scale. Computer scientists use log base 2 for analyzing algorithms. Financial analysts use natural log for compound interest calculations. Even the way your eyes perceive brightness is logarithmic, which is why a 100-watt bulb does not seem twice as bright as a 50-watt bulb.
Try More SupaCalc Tools
Free calculators for finance, health, AI costs, and more.
Browse All Calculators