# Derivative of 2ˣ and aˣ: Formula, Proof and Examples

> The derivative of 2ˣ is 2ˣ ln 2, and of aˣ is aˣ ln a. See the proof by rewriting aˣ as e^(x ln a), chain rule examples and a graph.

Source: https://practicecalculus.com/derivatives/2-to-the-x
Updated: 2026-11-06

$$ \frac{d}{dx}\,2^x = 2^x\ln 2 $$

## At a glance

- **Derivative of 2ˣ:** $2^x\ln 2 \approx 0.693\cdot 2^x$
- **General base:** $\dfrac{d}{dx}a^x = a^x\ln a$ for $a > 0$
- **Chain rule form:** $\dfrac{d}{dx}a^u = a^u\ln a\cdot u'$
- **Key rewrite:** $a^x = e^{x\ln a}$
- **Integral version:** $\int 2^x\,dx = \dfrac{2^x}{\ln 2} + C$

## Key takeaways

- The derivative of $2^x$ is $2^x\ln 2$, and for any base $a > 0$, $\frac{d}{dx}a^x = a^x\ln a$.
- The proof rewrites $a^x = e^{x\ln a}$ and uses the chain rule.
- Base $e$ is the special case where $\ln e = 1$, so the extra factor disappears.
- Do not confuse $2^x$ (variable exponent) with $x^2$ (variable base): their derivatives are completely different.

The **derivative of $2^x$ is $2^x\ln 2$**. The same pattern works for every positive base:

$$\frac{d}{dx}\,2^x = 2^x\ln 2 \qquad\qquad \frac{d}{dx}\,a^x = a^x\ln a$$

Since $\ln 2 \approx 0.693$, the slope of $2^x$ is always about $69\%$ of its height.

## Graph of 2ˣ and its derivative

```graph
title: 'Graph of y = 2ˣ and its derivative y = 2ˣ ln 2'
caption: 'The derivative has the same shape as $2^x$, scaled down by $\ln 2 \approx 0.693$. At $x = 0$ the function is $1$ and the slope is $\ln 2$.'
x: [-4, 3.5]
y: [-1, 9]
functions:
  - expr: 2^x
    label: y = 2ˣ
  - expr: 2^x*ln(2)
    label: y = 2ˣ ln 2 (derivative)
    dashed: true
points:
  - [0, 1, '(0, 1)']
  - [0, 0.693, 'slope ≈ 0.693']
```

## Proof: rewrite with base e

Any positive base can be written as a power of $e$, because $a = e^{\ln a}$:

$$a^x = \left(e^{\ln a}\right)^x = e^{x\ln a}$$

Now $\ln a$ is just a constant, so the [chain rule](/rules/chain-rule) with the [derivative of eˣ](/derivatives/e-to-the-x) gives

$$\frac{d}{dx}e^{x\ln a} = e^{x\ln a}\cdot\ln a = a^x\ln a$$

For $a = 2$ this is $2^x\ln 2$. For $a = e$ it is $e^x\ln e = e^x$, which is why $e$ is the natural base: it is the only base with no extra factor.

## The size of the factor ln a

| Base $a$ | $\ln a$ | Derivative of $a^x$ |
| --- | --- | --- |
| $2$ | $\approx 0.693$ | $2^x\ln 2$ |
| $e$ | $1$ | $e^x$ |
| $3$ | $\approx 1.099$ | $3^x\ln 3$ |
| $10$ | $\approx 2.303$ | $10^x\ln 10$ |
| $\frac{1}{2}$ | $\approx -0.693$ | $-\left(\frac{1}{2}\right)^x\ln 2$ |

For $0 < a < 1$, $\ln a$ is negative, so $a^x$ is decreasing. That matches the graph of exponential decay.

## Chain rule version and examples

$$\frac{d}{dx}a^u = a^u\ln a\cdot u'$$

**Example 1.** $\frac{d}{dx}2^{3x} = 2^{3x}\ln 2\cdot 3 = 3\ln 2\cdot 2^{3x}$.

**Example 2.** $\frac{d}{dx}3^{x^2} = 3^{x^2}\ln 3\cdot 2x = 2x\ln 3\cdot 3^{x^2}$.

**Example 3.** $\frac{d}{dx}2^{-x} = -2^{-x}\ln 2$.

**Example 4: product rule.** For $f(x) = x\cdot 2^x$, the [product rule](/rules/product-rule) gives

$$f'(x) = 2^x + x\cdot 2^x\ln 2 = 2^x(1 + x\ln 2)$$

**Example 5: growth rate.** A population $P(t) = 500\cdot 2^t$ doubles every unit of time. Its growth rate at $t = 3$ is $P'(3) = 500\cdot 8\ln 2 \approx 2773$ per unit time.

## 2ˣ versus x²

| Function | Base | Exponent | Rule | Derivative |
| --- | --- | --- | --- | --- |
| $x^2$ | variable | constant | power rule | $2x$ |
| $2^x$ | constant | variable | exponential rule | $2^x\ln 2$ |
| $x^x$ | variable | variable | logarithmic differentiation | $x^x(\ln x + 1)$ |

When both base and exponent vary, neither rule applies on its own. See the [derivative of xˣ](/derivatives/x-to-the-x).

## Common mistakes

1. **Using the power rule: $x\cdot 2^{x-1}$.** Wrong rule for a variable exponent.
2. **Leaving out $\ln 2$.** That would be correct only for base $e$.
3. **Writing $\log 2$ instead of $\ln 2$.** The factor is the natural log.

The reverse, $\int 2^x\,dx = \frac{2^x}{\ln 2} + C$, is on the [integral of 2ˣ](/integrals/2-to-the-x) page. The inverse function, $\log_2 x$, is covered on the [derivative of log x](/derivatives/log-x) page. See also [exponential functions](/functions/exponential-functions).

## Frequently asked questions

### What is the derivative of 2^x?

The derivative of $2^x$ is $2^x\ln 2$, which is about $0.693\cdot 2^x$.

### What is the derivative of a^x?

For any constant $a > 0$, $\frac{d}{dx}a^x = a^x\ln a$. For example, $\frac{d}{dx}10^x = 10^x\ln 10$ and $\frac{d}{dx}3^x = 3^x\ln 3$.

### Why is the derivative of 2^x not x·2^(x−1)?

That is the power rule, which needs a variable base and a constant exponent. In $2^x$ the base is constant and the exponent is the variable, so you use the exponential rule instead.

### What is the derivative of 2^(3x)?

By the chain rule, $2^{3x}\ln 2\cdot 3 = 3\ln 2\cdot 2^{3x}$.
