L'Hopital's Rule

L'Hopital's Rule efficiently solves limits that reduce to 0/0 or ∞/∞ forms by taking derivatives of the numerator and denominator separately.

limf(x)g(x)=limf(x)g(x)for 00 or \lim \frac{f(x)}{g(x)} = \lim \frac{f'(x)}{g'(x)} \quad \text{for } \tfrac{0}{0} \text{ or } \tfrac{\infty}{\infty}

Solve a problem with L'Hopital's Rule

Type the problem. The solver will use L'Hopital's Rule where L'Hopital's Rule is the right tool, and tell you when it is not.

Drag one in or paste from the clipboard. JPEG, PNG or WebP. You get the transcription to check before anything is solved.

How to get a better answer
  • Paste the whole problem, including the instruction word — "simplify", "solve for x" and "factor" lead to three different answers.
  • Say what you have already tried. "I got x = 4 and the book says 2" turns a solution into a diagnosis.
  • Set the level in the settings button. A calculus shortcut is not a better answer if you have not met derivatives yet.
  • For a photo, get the whole problem in frame and hold the page flat — you get the transcription to fix before anything is solved.

What each symbol means

What L'Hopital's Rule takes
ff
gg
xx
L'Hopital's Rule
SymbolMeaning
ffThe function in the numerator of the limit ratio; confusing this with gg causes you to differentiate the wrong function.
ggThe function in the denominator of the limit ratio; after applying L'Hopital's Rule, its derivative replaces it in the new limit.
xxThe variable with respect to which we compute the limit; you must differentiate ff and gg with respect to xx, not any other variable.

When to use it

Reach for L'Hopital's Rule when direct substitution into a limit gives the indeterminate form 0/0 or ∞/∞.

Level

Usually taught in: Calculus I

Worked examples

1. Find a limit that reduces to 0/0 with small integers

Problem

Find limx1x21x1\lim_{x \to 1} \frac{x^2 - 1}{x - 1}.
  1. limx1x21x1\lim_{x \to 1} \frac{x^2 - 1}{x - 1}

    At x=1x = 1, the numerator is 11=01 - 1 = 0 and the denominator is 11=01 - 1 = 0, giving the indeterminate form 00\frac{0}{0}.

  2. ddx(x21)=2x,ddx(x1)=1\frac{d}{dx}(x^2 - 1) = 2x, \quad \frac{d}{dx}(x - 1) = 1

    Differentiate the numerator and denominator separately with respect to xx.

  3. limx12x1=2(1)=2\lim_{x \to 1} \frac{2x}{1} = 2(1) = 2

    Evaluate the ratio of derivatives at x=1x = 1 to find the limit.

Answer: 22

This is a straightforward application of L'Hopital's Rule: the original limit gives 00\frac{0}{0}, we differentiate both parts, and the new limit evaluates directly to 22.

2. Apply L'Hopital's Rule multiple times with exponentials

Problem

Find limx0ex1xx2\lim_{x \to 0} \frac{e^x - 1 - x}{x^2}.
  1. limx0ex1xx2\lim_{x \to 0} \frac{e^x - 1 - x}{x^2}

    At x=0x = 0, the numerator is 110=01 - 1 - 0 = 0 and the denominator is 00, giving 00\frac{0}{0}.

  2. ddx(ex1x)=ex1,ddx(x2)=2x,giving limx0ex12x\frac{d}{dx}(e^x - 1 - x) = e^x - 1, \quad \frac{d}{dx}(x^2) = 2x, \quad \text{giving } \lim_{x \to 0} \frac{e^x - 1}{2x}

    Apply L'Hopital's Rule and differentiate both parts. Evaluating at x=0x = 0 still gives 00\frac{0}{0}, so apply the rule again.

  3. ddx(ex1)=ex,ddx(2x)=2,limx0ex2=12\frac{d}{dx}(e^x - 1) = e^x, \quad \frac{d}{dx}(2x) = 2, \quad \lim_{x \to 0} \frac{e^x}{2} = \frac{1}{2}

    On the second application, the denominator is non-zero and the limit is now determinate.

Answer: 12\frac{1}{2}

Sometimes one application of L'Hopital's Rule is not enough; if the new limit is still indeterminate, apply the rule again. Continue until the limit becomes determinate.

3. Score formula at a boundary level in a video game

Problem

In an online role-playing game, a player's score at level \ell is S()=382S(\ell) = \frac{\ell^3 - 8}{\ell - 2} points. What is the score at level 2?
  1. S(2)=23822=00S(2) = \frac{2^3 - 8}{2 - 2} = \frac{0}{0}

    Direct substitution of =2\ell = 2 produces 00\frac{0}{0}, so L'Hopital's Rule applies to find the intended score.

  2. dd(38)=32,dd(2)=1\frac{d}{d\ell}(\ell^3 - 8) = 3\ell^2, \quad \frac{d}{d\ell}(\ell - 2) = 1

    Differentiate the numerator and denominator separately with respect to \ell.

  3. lim2321=3(2)2=12\lim_{\ell \to 2} \frac{3\ell^2}{1} = 3(2)^2 = 12

    Evaluate the ratio of derivatives at =2\ell = 2 to find the player's score at that level.

Answer: 12 points12 \text{ points}

L'Hopital's Rule finds meaningful values at edge cases where a direct formula breaks down. In game design, formulas built from limits describe boundary behavior; L'Hopital's Rule makes such limits computable.

Common mistakes

Where L'Hopital's Rule usually goes wrong
Answer came out wrong
Using the quotient rule on f(x)g(x)\frac{f(x)}{g(x)} before applying L'Hopital's Rule.
Always find f(x)f'(x) and g(x)g'(x) independently first, then form f(x)g(x)\frac{f'(x)}{g'(x)} and evaluate the limit.
Applying L'Hopital's Rule to a limit that does not give 00\frac{0}{0} or \frac{\infty}{\infty}.
Always substitute the limit point into the numerator and denominator first to check the form; only apply the rule if you get exactly 00\frac{0}{0} or \frac{\infty}{\infty}.
Forgetting to differentiate both the numerator and denominator, or differentiating only one.
Every time you apply the rule, explicitly write f(x)=f'(x) = \ldots and g(x)=g'(x) = \ldots separate before forming the new ratio.
The mistakeWhy it is wrongThe fix
Using the quotient rule on f(x)g(x)\frac{f(x)}{g(x)} before applying L'Hopital's Rule.L'Hopital's Rule requires you to differentiate f(x)f(x) and g(x)g(x) *separately*, not to apply the quotient rule to the ratio itself.Always find f(x)f'(x) and g(x)g'(x) independently first, then form f(x)g(x)\frac{f'(x)}{g'(x)} and evaluate the limit.
Applying L'Hopital's Rule to a limit that does not give 00\frac{0}{0} or \frac{\infty}{\infty}.L'Hopital's Rule only works for these two indeterminate forms; using it on any other limit produces an incorrect answer.Always substitute the limit point into the numerator and denominator first to check the form; only apply the rule if you get exactly 00\frac{0}{0} or \frac{\infty}{\infty}.
Forgetting to differentiate both the numerator and denominator, or differentiating only one.L'Hopital's Rule requires the derivative of *both* f(x)f(x) and g(x)g(x) independently; omitting one breaks the rule.Every time you apply the rule, explicitly write f(x)=f'(x) = \ldots and g(x)=g'(x) = \ldots separate before forming the new ratio.

Tips and when to use something else

  • Always check the form first: substitute the limit point into both numerator and denominator; proceed only if you get 00\frac{0}{0} or \frac{\infty}{\infty}.
  • If the new limit after applying the rule is still indeterminate, you may apply L'Hopital's Rule again—sometimes multiple applications are needed.
  • For polynomial limits that reduce to 00\frac{0}{0}, try Limits by Factoring instead; it is simpler and avoids calculus altogether.
  • Check your derivatives with care; any error in f(x)f'(x) or g(x)g'(x) cascades into the final answer.

Frequently asked questions

When should I use L'Hopital's Rule instead of factoring?
Use L'Hopital's Rule when factoring is difficult or impossible—especially with exponentials, logarithms, or trigonometric functions. Factoring is usually simpler for polynomials, so attempt that first if the numerator and denominator are products.
Can I apply L'Hopital's Rule more than once?
Yes. If the new limit after the first application is still 00\frac{0}{0} or \frac{\infty}{\infty}, differentiate the numerator and denominator again and repeat the process. Continue until the limit is determinate or L'Hopital's Rule no longer applies.
What if the limit never becomes determinate, no matter how many times I apply L'Hopital's Rule?
This signals that L'Hopital's Rule is not the right tool for that problem. The limit may not exist, or another method—such as Limits by Factoring, trigonometric identities, or algebraic manipulation—might succeed.
Is L'Hopital's Rule the same as the quotient rule?
No. The quotient rule finds the derivative of a single quotient function f(x)g(x)\frac{f(x)}{g(x)}. L'Hopital's Rule evaluates limits of ratios by treating the numerator and denominator as independent functions. They look similar but serve entirely different purposes.

Need a different method?

The full solver is not scoped to one formula — type any problem and it will pick the method.

Open the math solver

Reviewed 2026-09-18