Logarithm Calculator
Find the logarithm of a number to any base, together with its common (base 10), natural (base e) and binary (base 2) logarithms, with the working.
Try your own numbers
Estimate only. Not engineering or safety advice. Check the result against the applicable standard and the equipment data, and have a competent engineer review it before it is relied on. Terms of use.
Open in the calculator with these values
About this calculator
This page calculates log base b of x, common logarithm log₁₀ x, natural logarithm ln x and 1 more result from number x and base b. Change any value or its unit and the result updates. The steps below show the working for the default values, so you can check each line against your own method.
Limits of this calculator
Use the common logarithm for decibels, orders of magnitude and the pH scale, the natural logarithm for exponential growth and decay and time constants, and base 2 for bits and binary steps. To go back from a logarithm to the number use the exponent calculator with the base and the logarithm as the power. For a ratio in decibels see the dB to ratio converter.
Cross-check: 24 reference cases, calculated from textbook formulas coded separately from the engine by the same author, agree with this calculator. This is not an independent review.
Verification status: Engineering reference
Engineering reference. Formula and method documented and tested against separately coded reference calculations. Not yet Verified: the evidence listed on this page is still needed.
What this calculator checks
- The arithmetic of the published formula for the values you entered, in the units shown.
What remains unverified
- That the inputs suit your application. Take ratings, resistances and constants from the manufacturer data sheet or project specification.
Verification register entry
| Calculation author | Rahul Sharma (author) |
|---|---|
| Technical review | No independent technical review has been carried out |
| Individual professional approval | Not recorded |
| Formula reference | not recorded |
| Standard and edition | Not applicable: Pure mathematics or statistics; no electrical standard governs the method |
| Standard review state | Not applicable |
| Scope-screening note | not recorded |
| Cross-check test cases | 24 reference vectors (tests/reference_vectors.json) |
| Review date | not recorded |
| Next review date | not recorded |
| Status | Engineering reference |
Needed before this calculator can be marked Verified: reviewer name, qualification and review date; exact formula reference; formula source (textbook or standard); next review date.
Formula
Worked example
| Input | Value |
|---|---|
| Number x | 1,000 |
| Base b | 10 |
- log base 10 of 1,000 = ln x / ln b = 6.90775528 / 2.30258509 = 3
- Check: 10 ^ 3 = 1,000
- Common log = 3 Natural log = 6.90775528 Binary log = 9.96578428
Assumptions
- x must be greater than zero and the base greater than zero and not equal to 1
- The base for the first result is whatever you enter; the other three results are always base 10, base e and base 2
- A base of exactly 10 or 2 uses the exact logarithm, so log₁₀ 1000 is 3 and not 2.9999999999999996
- Decibels are 10 log₁₀ of a power ratio and 20 log₁₀ of a voltage or current ratio
Use the common logarithm for decibels, orders of magnitude and the pH scale, the natural logarithm for exponential growth and decay and time constants, and base 2 for bits and binary steps. To go back from a logarithm to the number use the exponent calculator with the base and the logarithm as the power. For a ratio in decibels see the dB to ratio converter.
Inputs and results
| Input | Unit | Allowed or shown | Note |
|---|---|---|---|
| Number x | (number) | greater than 0 | Must be greater than zero. The logarithm of zero or a negative number is not a real number. |
| Base b | (number) | greater than 0 | Greater than zero and not 1. Use 10 for the common logarithm, 2.718281828 for the natural logarithm, 2 for the binary logarithm. |
| Result | Unit | Allowed or shown | Note |
|---|---|---|---|
| log base b of x | (number) | Shown to 8 decimal places | |
| Common logarithm log₁₀ x | (number) | Shown to 8 decimal places | |
| Natural logarithm ln x | (number) | Shown to 8 decimal places | |
| Binary logarithm log₂ x | (number) | Shown to 8 decimal places |
How it is calculated
Each input is converted to the base unit of its quantity, the formula above is applied in the order shown in the worked example, and each result is shown in the unit you choose. Results are held at full precision and rounded only for display, except where a step selects a standard size, as the worked example shows. A value outside its allowed range is refused with a message instead of giving a result.
How the result changes with number x
| Number x | log base b of x | Common logarithm log₁₀ x | Natural logarithm ln x |
|---|---|---|---|
| 100 | 2 | 2 | 4.60517019 |
| 250 | 2.39794001 | 2.39794001 | 5.52146092 |
| 500 | 2.69897 | 2.69897 | 6.2146081 |
| 1,000 | 3 | 3 | 6.90775528 |
| 2,000 | 3.30103 | 3.30103 | 7.60090246 |
| 4,000 | 3.60205999 | 3.60205999 | 8.29404964 |
| 10,000 | 4 | 4 | 9.21034037 |
Other inputs are the same as in the worked example above.
Standards and further reading
Complex numbers, rectangular and polar form and angle conversion are standard mathematics, not the subject of a standard. Standards apply when the result feeds an electrical design, and they set the method there.
Frequently asked questions
What do I need to enter?
Enter number x and base b. Change the unit of a value with its selector and the result stays the same.
What does this calculator assume?
x must be greater than zero and the base greater than zero and not equal to 1. The base for the first result is whatever you enter; the other three results are always base 10, base e and base 2. A base of exactly 10 or 2 uses the exact logarithm, so log₁₀ 1000 is 3 and not 2.9999999999999996. Decibels are 10 log₁₀ of a power ratio and 20 log₁₀ of a voltage or current ratio.
Which calculators should I use next?
Common next steps are Exponent and Root Calculator, Quadratic Equation Solver, Trigonometry (Sin, Cos, Tan) and RMS, Peak and Peak-to-Peak. The related links at the bottom of this page open them.
How accurate are the results?
Every figure comes from the same tested engine as the Elecmetric calculators and is meant for estimating. 24 reference cases, calculated from textbook formulas coded separately from the engine by the same author, agree with this calculator. This is not an independent review. Check design values against the standard and the equipment data you work to.
Formula guides and reference
Longer explanations with worked examples and tables, written for the same topic.
- Quadratic, Logarithm and Power Formulas: Formulas for the quadratic equation, logarithms and exponents with electrical examples: real and complex roots, decibels
- Trigonometry Formulas for Electrical Engineers: Sine, cosine and tangent formulas for engineers: the six trig functions, degrees and radians
- Complex Number Formulas: Polar and Rectangular: Complex number formulas for engineers: rectangular and polar form, conversion with atan2, addition
More Engineering Mathematics calculatorsAll engineering calculatorsLogarithm Calculator in Elecmetric