Step-by-step solver·Exact symbolic engine
Interactive Calculus Problem Solver
Derivatives, antiderivatives, definite and improper integrals, and limits. Every answer comes with the rules used, and antiderivatives are verified by differentiating them back.
Input syntax
- Powers
x^2, rootssqrt(x),cbrt(x), absolute value|x| - Implicit multiplication works:
3x sin(2x) sin cos tan sec csc cot,asin acos atan,sinh cosh tanhe^xorexp(x);ln(x)is the natural log. In this solverlog(x)also means the natural log (the usual calculus convention); typelog10(x)for base 10- Constants
piande; bounds acceptinfand-inf
Use our Derivative Calculator to get the answer instantly.
What is the Derivative of Log x?
The derivative of log x represents the instantaneous rate at which the value of the logarithmic function changes with respect to its input variable, x. It also corresponds to the slope of the tangent line to the graph of y = log x at any given point. The specific formula for this derivative hinges entirely on the base of the logarithm you use.
A logarithm, denoted as logₐ x, answers the question: “To what power must base ‘a’ be raised to get x?” For example, log₁₀ 100 = 2 because 10² = 100. The derivative quantifies how this power changes as x changes.
The two most common bases for logarithms in calculus are base ‘e’ (known as the natural logarithm, written as ln x) and base 10 (often written simply as log x). [math.dartmouth.edu] The number ‘e’, or Euler’s number, is an irrational constant approximately equal to 2.71828, which appears naturally in many areas of mathematics and science.
Derivative of log x (Base 10)
When you write ‘log x’ without an explicit base, it often implies a base of e in mathematics. Conventions vary by context. [mathworld.wolfram.com] The formula for its derivative is:
d/dx (log₁₀ x) = 1/(x ln 10)
Here, ‘ln 10’ is the natural logarithm of 10, which is a constant approximately equal to 2.302585. This means the derivative of log₁₀ x is approximately 1/(2.302585x).
Derivative of ln x (Natural Logarithm, Base e)
The natural logarithm, ln x, is a special case of logₐ x where the base ‘a’ is Euler’s number, ‘e’. Its derivative is notably simpler and is one of the most frequently used derivative rules:
d/dx (ln x) = 1/x
This fundamental result is why mathematicians often prefer the natural logarithm in calculus. It simplifies many differentiation and integration problems.
Derivative of log x Base ‘a’ (logₐ x)
For a logarithm with any arbitrary positive base ‘a’ (where a ≠ 1), the general formula for its derivative is:
d/dx (logₐ x) = 1/(x ln a)
This general formula encompasses both the base 10 and natural logarithm cases. If a = 10, you get 1/(x ln 10). If a = e, you get 1/(x ln e). Since ln e = 1, this simplifies to 1/x, confirming the natural logarithm’s derivative.
How to Find the Derivative of Log x Using the Change of Base Rule
You can derive the derivative of logₐ x by first converting it to the natural logarithm using the change of base rule. This method provides a clear understanding of why the ‘ln a’ term appears in the denominator.
The change of base rule states that logₐ x = ln x / ln a. Since ln a is a constant, you can treat 1/ln a as a constant multiplier when differentiating.
-
- Start with the function: Let y = logₐ x.
- Apply the change of base rule: Rewrite y as
y = (1/ln a) ln x. - Differentiate with respect to x: Since 1/ln a is a constant, you can pull it out of the derivative.
dy/dx = (1/ln a) d/dx (ln x) - Substitute the derivative of ln x: We know that
d/dx (ln x) = 1/x.dy/dx = (1/ln a) (1/x) - Simplify: Combine the terms to get the final derivative.
dy/dx = 1/(x ln a)
This step-by-step process clearly shows how we derive the derivative of log x with an arbitrary base ‘a’. We derive it from the more straightforward derivative of the natural logarithm.
Worked Examples for Derivative of Log x
Let’s walk through a couple of examples to solidify your understanding of how to apply these derivative rules.

Example 1: Derivative of log x with Base 5
Suppose you need to find the derivative of the function f(x) = log₅ x.
- Identify the base: Here, the base ‘a’ is 5.
- Apply the general formula: The formula for
d/dx (logₐ x)is1/(x ln a). - Substitute the base: Replace ‘a’ with 5.
f'(x) = 1/(x ln 5) - Calculate the constant (optional, for numerical value): The value of ln 5 is approximately 1.6094. So,
f'(x) ≈ 1/(1.6094x).
The derivative of log₅ x is exactly 1/(x ln 5).
Example 2: Derivative of log(x²)
This example involves the chain rule because the argument of the logarithm is a function of x (x²) rather than just x. When no base is specified, base 10 will be assumed.
- Identify the outer and inner functions: The outer function is
log₁₀ u, and the inner function isu = x². - Find the derivative of the outer function:
d/du (log₁₀ u) = 1/(u ln 10). - Find the derivative of the inner function:
d/dx (x²) = 2x. - Apply the chain rule: The chain rule states
d/dx [f(g(x))] = f'(g(x)) g'(x). So, you multiply the derivative of the outer function (with u substituted back) by the derivative of the inner function.d/dx (log₁₀ x²) = [1/(x² ln 10)] * (2x) - Simplify:
d/dx (log₁₀ x²) = 2x / (x² ln 10) = 2 / (x ln 10)
Therefore, the derivative of log(x²) is 2 / (x ln 10).
Quick Reference Table: Common Logarithmic Derivatives
This table provides a quick lookup for the derivatives of common logarithmic functions, which can be useful for checking your work or for rapid recall during problem-solving.

| Function | Derivative | Condition |
|---|---|---|
ln x |
1/x |
x > 0 |
log₁₀ x |
1/(x ln 10) |
x > 0 |
logₐ x |
1/(x ln a) |
x > 0, a > 0, a ≠ 1 |
ln u(x) |
u'(x)/u(x) |
u(x) > 0 |
logₐ u(x) |
u'(x)/(u(x) ln a) |
u(x) > 0, a > 0, a ≠ 1 |
ln |x| |
1/x |
x ≠ 0 |
log₁₀ |x| |
1/(x ln 10) |
x ≠ 0 |
Common Mistakes and Traps When Differentiating Log x
Differentiating logarithmic functions can sometimes lead to errors, especially when dealing with different bases or complex arguments. A few common pitfalls that students often encounter have been noticed.
Mistake 1: Assuming log x is always ln x
A very frequent error is to assume that ‘log x’ always refers to the natural logarithm (ln x). This leads to the derivative of 1/x. [math.dartmouth.edu] This is only true if the base is ‘e’. As Google’s facts state, a common misconception is that the derivative of log x is always 1/x. This is only true for the natural logarithm.
Why it happens: In some fields, especially computer science, ‘log x’ can imply base 2 or base ‘e’. However, in mathematics contexts, especially when no base is specified, ‘log x’ typically denotes base e, although conventions vary. [mathworld.wolfram.com] Always clarify the base before differentiating.
How to avoid it: Explicitly write the base, e.g., log₁₀ x or ln x, to prevent ambiguity. If the base is not given, and you’re in a general math context, we recommend assuming base 10 unless otherwise specified by your instructor or textbook.
Mistake 2: Forgetting the ‘ln a’ factor for bases other than ‘e’
When differentiating logₐ x, it’s easy to forget the ln a term in the denominator, especially if you’re used to the simpler derivative of ln x. This is a direct consequence of the change of base rule.
Why it happens: The formula for ln x (1/x) is so fundamental that students sometimes overgeneralize it to all logarithmic functions without accounting for the base. Another common error in logarithmic differentiation is taking logarithms of a nonpositive base, which is invalid.
How to avoid it: Always remember the general formula d/dx (logₐ x) = 1/(x ln a). Think of ln x as a special case where a = e, and since ln e = 1, the denominator simplifies.
Mistake 3: Misapplying the Chain Rule with composite functions
When the argument of the logarithm is a function of x, such as logₐ (u(x)), you must apply the chain rule. This means you differentiate the outer log function and then multiply by the derivative of the inner function, u'(x). As Google’s facts note, misinterpreting the chain rule by omitting the derivative of the inner function (du/dx) when differentiating natural logs is a frequent mistake.
Why it happens: Students might correctly find 1/(u(x) ln a) but then forget to multiply by u'(x). This is a common chain rule oversight that isn’t exclusive to logarithms.
How to avoid it: Whenever you see a function inside another function (like log(x²) or ln(sin x)), identify the ‘u’ (the inner function) and calculate both d/du (logₐ u) and du/dx. Then multiply them together.
Why is the Domain for Log x and its Derivative x > 0?
The domain of a logarithmic function, y = logₐ x, requires that its argument, x, must always be positive. This means x > 0. Consequently, the derivative of log x also shares this domain restriction.

The reason for this lies in the definition of a logarithm. A logarithm is the inverse of an exponential function. For example, if y = logₐ x, then aʸ = x. Since ‘a’ is a positive base (a > 0 and a ≠ 1), raising a positive number to any real power (positive, negative, or zero) will always result in a positive number. Therefore, x must be positive.
This restriction means that you cannot take the logarithm of zero or a negative number. If you were to graph y = log x, you would see that the function approaches negative infinity as x approaches zero from the positive side, and it is undefined for x ≤ 0. The derivative, representing the slope of this function, can only exist where the function itself is defined, hence x > 0.
However, for functions like logₐ |x|, the domain extends to all real numbers except x = 0. In this case, the derivative of logₐ |x| is 1/(x ln a) for x ≠ 0. This is because |x| ensures the argument is always positive. This allows for negative x values, but still excludes x = 0 because logₐ 0 is undefined.
Frequently asked questions
What is the derivative of log x by the first principle?
You can find the derivative of logₐ x by the first principle using the limit definition of the derivative: lim (h→0) [logₐ(x+h) - logₐ(x)] / h. This process involves using logarithm properties to combine the terms. Then you apply the limit, ultimately yielding 1/(x ln a).
Is the derivative of log x and ln x the same?
No, the derivative of log x and ln x are not generally the same. The derivative of ln x (natural logarithm, base e) is 1/x. However, the derivative of log x (typically base 10) is 1/(x ln 10). They are only the same if ‘log x’ specifically refers to the natural logarithm.
What is the derivative of log x squared (log x²)?
The derivative of log x² (assuming base 10) can be found using the chain rule. It results in 2 / (x ln 10). Alternatively, using the logarithm property log(x²) = 2 log x, you can differentiate 2 log x to also get 2 / (x ln 10).
Sources
Calculators for this topic
Keep learning
Derivative of sin²x: Step-by-Step Chain Rule Explained
The derivative of sin²x is sin(2x). This guide will walk you through the process step-by-step, highlighting the crucial role of the Chain Rule and trigonometric identities.
Derivative of Arccos x: Formula and Step-by-Step Examples
The derivative of arccos x is -1/√(1-x²), valid for x values between -1 and 1. This guide will explain the formula, how it’s derived, and how to apply it with the chain rule.

