Logarithm Calculator
How do I calculate a logarithm?
Result
How it is calculated
The logarithm logb(x) answers the question: what power must the base b be raised to in order to get x? The tool uses the change-of-base rule, logb(x) = ln(x) ÷ ln(b), and also shows the natural log ln(x) (base e ≈ 2.71828) and the common log log10(x). The value x must be greater than zero, and the base must be greater than zero and not equal to 1, otherwise no result is shown. Results are rounded to two decimals. Logs of numbers between 0 and 1 are negative.
Worked example
Find log2(64). Natural logs: ln(64) ≈ 4.1589 and ln(2) ≈ 0.6931. Divide: 4.1589 ÷ 0.6931 = 6.00, since 2⁶ = 64. The tool also shows ln(64) = 4.16 and log10(64) = 1.81.
Common mistakes
- Entering zero or a negative number as the value. Real logarithms are only defined for positive numbers.
- Using base 1, which has no logarithm because 1 raised to any power is 1.
- Confusing "log" with "ln". Calculators and textbooks differ on whether log means base 10 or base e; here the base is whatever you type.
- Swapping value and base. log2(64) = 6 but log64(2) is about 0.17.
- Assuming log(a + b) = log(a) + log(b). The sum rule applies to products: log(ab) = log(a) + log(b).
About this calculator
This tool calculates the logarithm of a number in any base you choose, answering the question "to what power must the base be raised to get this number", and also reports the same value's natural log (ln, base e) and base-10 log for convenience, since those two bases show up constantly in science and engineering formulas. Logarithms are the inverse of exponentiation, so this calculator is effectively solving b^x = n for x given b and n.
It is used by students working through algebra and precalculus problems, and by anyone in a scientific or technical field dealing with quantities that span huge ranges — pH in chemistry, decibels in acoustics, the Richter scale in seismology, and signal-to-noise ratios in engineering are all logarithmic scales specifically because they compress enormous ranges of values into manageable numbers. Programmers and data analysts also reach for logarithms when transforming skewed data for statistical analysis or visualization.
Was this helpful?
You can pick up to 3 reactions.
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
- Loan Calculator
- Profit Calculator
- Discount Calculator
- BMI Calculator
- Percentage Calculator
- Ideal Weight Calculator
- Age Calculator
- Pregnancy Due Date Calculator
- Compound Interest Calculator
- BMR Calculator (Basal Metabolic Rate)
- Tip Calculator
- Fuel Cost Calculator
- Date Difference Calculator
- Sleep Cycle Calculator
- Daily Water Intake Calculator
- Simple Interest Calculator
- Heart Rate Zones Calculator
- Running Pace Calculator
- Pet Age Calculator
- Calories Burned Calculator
- Macro Calculator
- TDEE Calculator (Total Daily Energy Expenditure)
- Waist-to-Hip Ratio Calculator
- Honor Roll Calculator
- One Rep Max (1RM) Calculator
- Ovulation Calculator
- Electricity Cost Calculator
- Unit Price Calculator
- Savings Goal Calculator
- Break-Even Point Calculator
- Paint Calculator
- Course Grade Average Calculator
- Business Days Calculator
- Time Duration Calculator
- Fuel Economy Calculator
- Temperature Converter
- Tile Calculator
- Aspect Ratio Calculator
- Roman Numeral Converter
- Goal Weight Timeline Calculator
- Salary Converter (Hourly to Annual)
- Credit Card Validator (Luhn)
- Body Surface Area (BSA) Calculator
- Feels-Like Temperature Calculator
- Ohm’s Law Calculator
- PPI (Pixel Density) Calculator
- Molar Mass Calculator
- Zodiac Sign Calculator (Western + Chinese)
- IBAN Validator
- Shoe Size Converter
- Country Info & Dialing Code Lookup
- Time Zone Difference (World Clock)
- CAGR (Compound Annual Growth Rate) Calculator
- Rule of 72 Calculator
- Blood Alcohol Content (BAC) Calculator
- Lean Body Mass (LBM) Calculator
- Pythagorean Theorem Calculator
- Speed Converter
- Download Time Calculator
- Date Calculator (Add/Subtract)
No calculators found
Comments (1)
Because the tool shows log10 alongside your chosen base, it doubles as a quick scale converter. A power ratio of 100 has log10 = 2.00, which is 20 dB, since decibels are 10 times the log of a power ratio. A hydrogen ion concentration of 0.001 mol/L gives log10 = -3.00, so the pH is 3. The sign flips for pH. Which logarithmic scale do you most often convert?