Compute, solve, and explore logarithms across 4 powerful modes
Logarithms are one of the most fundamental concepts in mathematics, science, and engineering. At their core, a logarithm answers the question: to what exponent must a base be raised to produce a given number? If b^y = x, then log_b(x) = y. This elegant inverse relationship with exponentiation makes logarithms indispensable across dozens of disciplines — from measuring earthquake intensity to computing the pH of a chemical solution, from analyzing information entropy in computer science to modeling the growth of populations over time. This Logarithm Calculator goes far beyond a simple log or antilog computation. It offers four distinct modes designed to cover the full spectrum of logarithmic calculations that students, engineers, scientists, and educators encounter: **Standard Mode** handles the everyday calculation of log_b(x) for any positive argument and any valid base. You can choose from four base presets — base 2 (binary, used in computer science and information theory), base e ≈ 2.71828 (natural logarithm, used in calculus, physics, and continuous growth models), base 10 (common logarithm, used in chemistry, acoustics, and geology), or any custom base of your choosing. Results are shown alongside the equivalent exponential form (b^y = x), a multi-base comparison panel displaying ln(x), log₁₀(x), and log₂(x) simultaneously, and a log curve chart generated by the LineGraph component. Decimal precision is configurable from 2 to 10 decimal places. **Equation Solver Mode** enables you to solve structured logarithmic equations numerically with step-by-step solutions. Six equation patterns are supported: simple (log_b(x) = c → x = b^c), scaled argument (log_b(k·x) = c), sum via the Product Rule (log_b(x) + log_b(a) = c → x = b^c / a), difference via the Quotient Rule (log_b(x) − log_b(a) = c → x = a × b^c), coefficient via the Power Rule (k × log_b(x) = c → x = b^(c/k)), and both-sides (log_b(x) = log_b(a) → x = a). Each solution displays the logarithm rule applied and every algebraic transformation step so you can learn and verify. **Log Table Generator** produces a complete table of log_b(x) values over a user-defined range (start, end, step). This mirrors the printed logarithm tables historically used by scientists and engineers before the age of electronic calculators, and is still useful for education, quick reference, and pattern recognition. Tables can be exported to CSV with one click using the Blob API — no server required. **Scientific Applications Mode** brings together six named sub-calculators built on logarithmic formulas: (1) Sound Decibels: dB = 10 × log₁₀(I / I₀) — measure sound intensity relative to the hearing threshold; (2) pH / Acidity: pH = −log₁₀([H⁺]) — determine the acidity or alkalinity of a solution; (3) Richter Magnitude: M = log₁₀(A / A₀) — compute earthquake magnitude from amplitude; (4) Doubling Time: t = ln(2) / r — find how many years it takes for a quantity growing at rate r% to double; (5) Halving Time: t = ln(0.5) / (−r) — find how long for a decaying quantity to halve; (6) Investment Growth Time: t = ln(FV / PV) / r — calculate how many years for an investment to grow from present value to future value at a continuous rate. All four modes include step-by-step workings so you understand not just the answer, but the mathematical reasoning behind it. Every result can be copied to clipboard for use in reports, homework, or other applications. Input validation ensures that invalid entries — such as zero or negative arguments, or a base equal to 1 — are caught before calculation, with clear explanations of why those values are mathematically undefined. Whether you are a high school student first encountering logarithms in an algebra course, a university student studying calculus or differential equations, a chemist calculating solution pH, a seismologist interpreting Richter scale readings, or a software engineer computing time complexity — this calculator provides the precision, depth, and educational detail you need.
Understanding Logarithms
What Is a Logarithm?
A logarithm is the inverse operation of exponentiation. Given the equation b^y = x, the logarithm base b of x equals y, written log_b(x) = y. In plain language: a logarithm tells you the exponent (y) you must raise the base (b) to in order to get the argument (x). For example, log₁₀(1000) = 3 because 10³ = 1000. Logarithms transform multiplication into addition (via the Product Rule), division into subtraction (Quotient Rule), and exponentiation into multiplication (Power Rule) — properties that made them essential calculation tools for centuries before digital computers. Three bases appear most frequently: base 10 (common log), base e ≈ 2.71828 (natural log, ln), and base 2 (binary log, log₂).
How Are Logarithms Calculated?
Modern calculators and computers compute logarithms using the change-of-base formula: log_b(x) = ln(x) / ln(b), where ln is the natural logarithm computed via the Taylor series or CORDIC algorithm. This means any base-b logarithm can be reduced to a natural log ratio. The antilogarithm (inverse) is b^y, computed as e^(y × ln(b)). For the equation solver, each pattern applies the definition directly: log_b(x) = c becomes x = b^c by exponentiating both sides. The Product Rule (log_b(x) + log_b(a) = c) uses log_b(x·a) = c to get x·a = b^c, then x = b^c / a. The Power Rule (k·log_b(x) = c) uses log_b(x^k) = c to get x = b^(c/k).
Why Do Logarithms Matter?
Logarithms compress enormous ranges of values into manageable scales. The Richter scale uses log₁₀ so that a magnitude 7 earthquake is 10× more powerful than magnitude 6 — without logs the numbers would be unwieldy. pH uses −log₁₀([H⁺]) to express hydrogen ion concentrations spanning 14 orders of magnitude (10⁻¹⁴ to 1 mol/L) on a 0–14 scale. Decibels use 10 × log₁₀(I/I₀) to represent sound intensities from near silence to jet engines on a 0–194 dB scale. In finance, ln(FV/PV)/r gives exact growth time under continuous compounding. In computer science, log₂ measures information entropy (bits), algorithm complexity (O(log n) search), and digital signal processing.
Limitations and Caveats
Logarithms in the real number domain are only defined for positive arguments (x > 0). The logarithm of zero is negative infinity (undefined as a finite number), and the logarithm of a negative number requires complex numbers, which this tool does not compute. The base must be positive and cannot equal 1 (log₁(x) would require 1^y = x, which is only satisfied when x = 1). The equation solver handles six structured patterns only — arbitrary symbolic equations with multiple logarithm terms on both sides (such as log(x) + log(x−1) = 1) require numerical root-finding methods beyond this tool's scope. The log table generator is limited to 200 rows to maintain UI performance. Scientific notation (e.g., 1e-6) is supported in application inputs.
Logarithm Formulas
Change of Base
log_b(x) = ln(x) / ln(b)
Convert a logarithm of any base to a ratio of natural logarithms. This is how calculators compute arbitrary-base logs internally.
Product Rule
log_b(a · c) = log_b(a) + log_b(c)
The logarithm of a product equals the sum of the logarithms. This property turns multiplication into addition.
Quotient Rule
log_b(a / c) = log_b(a) − log_b(c)
The logarithm of a quotient equals the difference of the logarithms. This property turns division into subtraction.
Power Rule
log_b(a^n) = n · log_b(a)
The logarithm of a power equals the exponent times the logarithm of the base argument. Exponents become coefficients.
Logarithm Reference Tables
Common Logarithm Values
Frequently used log₁₀ and ln values for quick reference.
| x | log₁₀(x) | ln(x) | log₂(x) |
|---|---|---|---|
| 1 | 0 | 0 | 0 |
| 2 | 0.3010 | 0.6931 | 1 |
| 5 | 0.6990 | 1.6094 | 2.3219 |
| 10 | 1 | 2.3026 | 3.3219 |
| 20 | 1.3010 | 2.9957 | 4.3219 |
| 50 | 1.6990 | 3.9120 | 5.6439 |
| 100 | 2 | 4.6052 | 6.6439 |
| e ≈ 2.718 | 0.4343 | 1 | 1.4427 |
| π ≈ 3.1416 | 0.4971 | 1.1447 | 1.6515 |
Logarithm Properties Summary
All essential logarithm identities and properties in one place.
| Property | Formula | Example |
|---|---|---|
| Product Rule | log(ab) = log(a) + log(b) | log(6) = log(2) + log(3) |
| Quotient Rule | log(a/b) = log(a) − log(b) | log(5) = log(10) − log(2) |
| Power Rule | log(aⁿ) = n·log(a) | log(1000) = 3·log(10) = 3 |
| Change of Base | log_b(x) = ln(x)/ln(b) | log₂(8) = ln(8)/ln(2) = 3 |
| Identity | log_b(b) = 1 | log₁₀(10) = 1 |
| Zero Property | log_b(1) = 0 | ln(1) = 0 |
| Inverse | b^(log_b(x)) = x | 10^(log₁₀(100)) = 100 |
Worked Examples
Calculate log₂(32)
Find the exponent y such that 2^y = 32.
We need log₂(32), meaning: 2^y = 32
Express 32 as a power of 2: 32 = 2⁵
Therefore log₂(32) = 5
log₂(32) = 5
Solve 2^x = 128 using logarithms
Take the logarithm of both sides to isolate x.
Start with 2^x = 128
Take log₂ of both sides: x = log₂(128)
Express 128 as a power of 2: 128 = 2⁷
Therefore x = 7
x = 7
Simplify log(x²y / z)
Apply the product, quotient, and power rules to expand the logarithmic expression.
Apply quotient rule: log(x²y / z) = log(x²y) − log(z)
Apply product rule: log(x²y) = log(x²) + log(y)
Apply power rule: log(x²) = 2·log(x)
Combine: 2·log(x) + log(y) − log(z)
log(x²y / z) = 2·log(x) + log(y) − log(z)
How to Use the Logarithm Calculator
Choose Your Mode
Select one of four modes at the top: Standard Log for computing log_b(x) directly, Equation Solver for solving log equations step-by-step, Log Table to generate a range of log values for export, or Applications for real-world calculators like pH, decibels, Richter scale, doubling time, and investment growth.
Enter Your Inputs
In Standard mode, enter your number and pick a base (2, e, 10, or custom). In Equation Solver, choose the equation pattern (e.g. sum, coefficient), enter the base, the right-hand side constant, and any secondary value. In Log Table mode, specify the base, start, end, and step size. In Applications, select the sub-calculator and fill in the appropriate fields.
Review the Results and Steps
Results appear automatically as you type. Standard mode shows the log value, antilog, equivalent exponential form (b^y = x), and a multi-base comparison bar chart. The Equation Solver and Applications modes display numbered step-by-step workings so you can follow the mathematical logic. The log curve chart visualizes the full log function with your input point highlighted.
Export or Copy
Click 'Copy Result' to copy the computed value to your clipboard for use in other applications. In Log Table mode, click 'Export CSV' to download the full table as a comma-separated file that opens in Excel, Google Sheets, or any spreadsheet application.
Frequently Asked Questions
What is the difference between log, ln, and log₂?
All three are logarithms, but with different bases. 'log' (without a base specified) conventionally means base 10 — the common logarithm used in science, chemistry, and engineering. 'ln' is the natural logarithm, base e ≈ 2.71828 — the base that appears naturally in calculus, growth models, and physics. 'log₂' is the binary logarithm, base 2 — the natural unit in computer science, information theory, and digital signal processing. All three can be converted to each other using the change-of-base formula: log_b(x) = ln(x) / ln(b). This calculator computes all three simultaneously in Standard mode so you can compare them for any input.
Why is the logarithm of zero or a negative number undefined?
Logarithms are defined only for positive arguments because they are the inverse of exponentiation with a positive base. Since b^y is always positive for any finite exponent y (when b > 0 and b ≠ 1), there is no real exponent y that satisfies b^y = 0 or b^y = negative number. As x approaches zero from the positive side, log(x) approaches negative infinity, but it never reaches an actual value at zero. For negative numbers, logarithms require complex numbers (the imaginary unit appears), which are outside the scope of real-number computation this calculator performs. The tool will display 'Undefined' for such inputs.
How does the equation solver handle different patterns?
The equation solver applies standard logarithm rules algebraically. For log_b(x) = c it uses the definition directly to get x = b^c. For the sum pattern (log_b(x) + log_b(a) = c) it applies the Product Rule (the two logs combine into one log of a product), then exponentiates to get x·a = b^c, and finally divides. For the coefficient pattern (k·log_b(x) = c) it applies the Power Rule to turn the coefficient into an exponent, yielding x = b^(c/k). Each step is displayed in the numbered step-by-step breakdown so you can follow the algebra and verify the result.
How is pH calculated using logarithms?
pH measures the acidity or alkalinity of a solution using the formula pH = −log₁₀([H⁺]), where [H⁺] is the hydrogen ion concentration in moles per litre. Neutral water at 25°C has [H⁺] = 10⁻⁷ mol/L, giving pH = −log₁₀(10⁻⁷) = 7. Acids have higher H⁺ concentrations and lower pH values (below 7), while bases have lower H⁺ concentrations and higher pH values (above 7). The logarithmic scale means each unit change in pH corresponds to a 10× change in hydrogen ion concentration. Enter the H⁺ concentration in the Applications mode pH sub-calculator — scientific notation (e.g. 1e-7) is supported.
What is doubling time and how is it calculated?
Doubling time is the period required for a quantity growing at a constant percentage rate to double in size. Under continuous compounding, the formula is t = ln(2) / r, where r is the annual growth rate expressed as a decimal (e.g. 7% = 0.07). The natural logarithm of 2 (≈ 0.6931) reflects the factor of doubling. For example, at 7% annual growth, the doubling time is ln(2) / 0.07 ≈ 9.9 years. A well-known approximation is the Rule of 72: divide 72 by the percentage rate to estimate doubling time. The calculator's Applications mode computes exact values and shows the full derivation.
How do I generate and export a logarithm table?
Switch to Log Table mode. Enter your desired base, a start value (must be positive), an end value, and a step size. The calculator generates a table of x and log_b(x) pairs for each step, up to a maximum of 200 rows. The table appears instantly in the results panel. Click 'Export CSV' to download the table as a .csv file named 'log-table-base-N.csv'. This file can be opened directly in Microsoft Excel, Google Sheets, LibreOffice Calc, or any text editor. The CSV format has two columns: x and log_b(x) with the computed value to six decimal places.
Related Tools
Log Calculator
Quick log and antilog calculator for common, natural, and binary logarithms.
Derivative Calculator
Compute symbolic derivatives including logarithmic differentiation with step-by-step solutions.
Equation Solver
Solve linear, quadratic, and systems of equations step-by-step.
Algebra Calculator
Simplify expressions, factor polynomials, and perform algebraic manipulations.
Online Calculator
General-purpose scientific calculator for arithmetic and function evaluations.