What the log button does
The log button on your calculator finds the logarithm of a number. A logarithm answers the question: "What power do I need to raise 10 to in order to get this number?" For example, log(100) = 2, because 10 raised to the power of 2 equals 100.
Most scientific calculators have a log button that assumes base 10 — meaning it always uses 10 as the starting number. Some calculators also have an ln button, which is the natural logarithm and uses a different base (the number e, approximately 2.718). The two are different functions and will give you different answers for the same input.
You will encounter logarithms in chemistry (pH calculations), physics (sound and light intensity), finance (compound interest), and biology (population growth). If you are working through a formula that includes "log" or "ln", your calculator's log button is how you solve it.
Key Takeaways
- The log button calculates base-10 logarithms; the ln button calculates natural logarithms (base e), and they produce different results.
- Enter the number first, then press log (or ln), rather than pressing log first on most standard calculators.
- Log of 1 always equals 0, and log of 10 always equals 1, which you can use to check if your calculator is working correctly.
- Negative numbers and zero have no logarithm in standard math, so your calculator will show an error if you try.
- Some graphing calculators and scientific calculators reverse the order — they require you to press log first, then enter the number in parentheses.
The basic steps on a standard scientific calculator
On most handheld scientific calculators, the process is straightforward: type the number you want the logarithm of, then press the log button. For example, to find log(50), you would type 50, then press log. The display will show approximately 1.699.
If your calculator has a two-line display (one line for input, one for output), you will see the number 50 on the top line and the result on the bottom line after you press log. If your calculator has a single-line display, it will replace the 50 with the result once you press log.
After you get a result, you can use it in another calculation immediately. For instance, if you need to multiply the log of 50 by 2, press log(50), then press ×, then press 2, then press =. The calculator will multiply the result by 2 without you having to write down the intermediate answer.
How to use log on a graphing calculator or computer
Graphing calculators like the TI-84 and computer-based calculators (including spreadsheet software and online tools) typically work differently. You press log first, then enter the number inside parentheses. For example, you would type log(50) and then press Enter or =.
In spreadsheet programs like Excel or Google Sheets, the syntax is the same: type =LOG(50) in a cell and press Enter. The equals sign tells the program you are entering a formula. Some spreadsheet programs also have LOG10() for base-10 logarithms and LN() for natural logarithms, so check your program's documentation if LOG() does not work as expected.
Online calculators vary widely. Some have a dedicated log button you click after entering the number, while others require you to type the full expression. If you are unsure, look for a help section or try entering a number you know the answer to — log(10) should always equal 1.
The difference between log and ln
The log button uses base 10 (also called the common logarithm). The ln button uses base e, approximately 2.718 (called the natural logarithm). They are two different mathematical functions, and using the wrong one will give you the wrong answer.
In most high school math and chemistry, you will use log (base 10). In calculus, physics, and advanced sciences, you will more often use ln (natural logarithm). Your textbook or assignment will tell you which one to use. If it says "log" without specifying, assume base 10. If it says "ln" or "natural log", use the ln button.
To see the difference: log(100) = 2, but ln(100) ≈ 4.605. Both are correct answers to their respective functions — they are just answering different questions about the same number.
What to do if you get an error
If your calculator displays an error (often shown as "Error", "E", "Math Error", or "Domain Error") when you press log, the most common cause is that you tried to take the logarithm of a negative number or zero. Logarithms of negative numbers and zero are undefined in standard mathematics, so your calculator correctly refuses to calculate them.
Check that you typed the correct number. If you meant to type 50 but typed -50, that is why you got an error. If the number is correct and it is negative or zero, then the formula you are working from may have an error, or you may have misunderstood which value to plug in.
If you get an error on a graphing calculator or computer, double-check your syntax. Make sure you have closed all parentheses, used the correct function name (LOG vs. LN), and that the number is inside the parentheses, not outside them.
Quick checks to verify your calculator is working
Test your log button with numbers you can verify by hand. Log(1) always equals 0, because 10 to the power of 0 is 1. Log(10) always equals 1, because 10 to the power of 1 is 10. Log(100) always equals 2, because 10 to the power of 2 is 100. If your calculator gives you these answers, the log button is working correctly.
For the natural logarithm, ln(1) always equals 0, and ln(e) always equals 1 (where e ≈ 2.718). If your calculator does not have an e button, you can type 2.718 and verify that ln(2.718) ≈ 1.
If your calculator fails these basic tests, it may be malfunctioning, or you may be pressing the buttons in the wrong order for your specific model. Check your calculator's manual or search online for the model number plus "how to use log".
Frequently Asked Questions
Can I calculate log of a decimal number like 0.5?
Yes. Log(0.5) ≈ −0.301. Logarithms of numbers between 0 and 1 are negative. This is correct — it means you would need to raise 10 to a negative power to get 0.5. Your calculator will handle decimals without any special steps.
What is the difference between log and log base 10?
They are the same thing. "Log" without a specified base means base 10 (common logarithm). If a textbook writes "log₁₀", it is emphasizing that it is base 10, but it is the same as pressing the log button on your calculator.
Why do I need logarithms if I have a calculator?
Logarithms appear in formulas for real-world problems — pH in chemistry, decibels in sound, half-life in physics. Your calculator's log button lets you solve those formulas. Without it, you would have to use trial and error or a lookup table.
Can I use log to undo an exponent?
Yes, in a sense. If you know that 10^x = 100 and you want to find x, you use log(100) = x. Logarithm is the inverse operation of exponentiation, so it "undoes" raising 10 to a power. The same applies to ln and the number e.