Skip to content
    Calculus

    L'Hôpital's Rule Explained (With Examples)

    What is 0 divided by 0? On its own, it has no answer. But a limit that looks like 0/0 often has a perfectly good one, and L’Hôpital’s Rule helps you find it by taking two quick derivatives. This guide shows you when the rule works and when it doesn’t.

    Math Solver Academic Editorial Board4 min read

    Key takeaways

    • Use L’Hôpital’s Rule only for 0/0 or ∞/∞ forms.
    • Differentiate the top and bottom separately, then take the limit again.
    • Do not use the quotient rule. It is a different thing.
    • For (xⁿ − aⁿ)/(x − a) as x → a, the limit is n·aⁿ⁻¹.
    In this guide
    1. 01What is L’Hôpital’s Rule?
    2. 02Why does L’Hôpital’s Rule matter?
    3. 03The rule
    4. 04How to use L’Hôpital’s Rule step by step
    5. 05Common mistakes to avoid
    6. 06Tips and tricks
    7. 07Where you’ll use it in real life
    8. 08Quick summary
    9. 09Worked example
    10. 10Frequently asked questions

    What is L’Hôpital’s Rule?

    A limit asks what value a function gets closer and closer to as x approaches a number. Usually you just plug the number in. But for (x² − 9)/(x − 3) at x = 3, plugging in gives 0/0.

    L’Hôpital’s Rule says: when you get 0/0 (or ∞/∞), replace the top and bottom with their derivatives, then try the limit again.

    Why does L’Hôpital’s Rule matter?

    0/0 limits appear all the time in calculus. The definition of a derivative itself is a 0/0 limit. Without a tool like this, you would need clever algebra or tables of values for each one.

    The rule is named after the French Marquis de l’Hôpital, who published it in 1696 in an early calculus textbook. His teacher, Johann Bernoulli, had actually discovered it.

    The rule

    if f(a) = g(a) = 0, lim (x→a) f(x)/g(x) = lim (x→a) f′(x)/g′(x)
    SymbolWhat it meansExample
    f(x)The top (numerator)x² − 9
    g(x)The bottom (denominator)x − 3
    f′, g′Their derivatives, taken separately2x and 1
    aThe number x is approaching3

    Why it works: near x = a, both f and g behave like straight lines through zero, so their ratio is close to the ratio of their slopes.

    This calculator works on the limit of (xⁿ − aⁿ)/(x − a) as x → a. The top’s derivative is n·xⁿ⁻¹ and the bottom’s is 1, so the answer is n·aⁿ⁻¹.

    How to use L’Hôpital’s Rule step by step

    1. 1Plug in x = a first. If you get a normal number, that is the answer. Stop.
    2. 2Check the form. Only continue if you get 0/0 or ∞/∞.
    3. 3Differentiate top and bottom separately. Find f′(x) and g′(x).
    4. 4Plug in again. Work out f′(a)/g′(a).
    5. 5Repeat if needed. If you still get 0/0, differentiate again.

    Now try it yourself. Enter n and a in the calculator below to see each step of the rule.

    Try it yourself

    Pre-filled with the example — change any value.

    🧮
    Calculus
    University

    L'Hôpital's Rule

    Evaluate lim[x→a] (xⁿ − aⁿ)/(x − a) using L'Hôpital's Rule (= n·aⁿ⁻¹).

    lim f(x)/g(x) = lim f'(x)/g'(x) [0/0 form]

    f'(x) slope
    Tangent Line dy/dx
    120
    120

    💡 Example

    Reference
    Inputs:n=3, a=2
    Result:12
    Open the full L'Hôpital's Rule calculator

    Common mistakes to avoid

    • Using it when the form is not 0/0 or ∞/∞. lim (x→0) (x + 1)/(x + 2) is simply 1/2. Using the rule wrongly would give 1/1 = 1.
    • Forgetting to check again. After one round, plug in before differentiating a second time.
    • Using it on other forms directly. Forms like 0 × ∞ must first be rewritten as a fraction.

    Tips and tricks

    • Famous limits: lim (x→0) sin x / x = cos 0 / 1 = 1 and lim (x→0) (eˣ − 1)/x = e⁰/1 = 1.
    • Numbers check: try x = 3.001 on a calculator. (3.001² − 9)/0.001 = 6.001, very close to 6.
    • Other tools: the squeeze theorem helps with limits that bounce around, like x·sin(1/x).

    Where you’ll use it in real life

    • Derivatives from scratch: the limit definition calculator is built on 0/0 limits.
    • Continuity: filling a “hole” in a graph so the function is continuous (see the continuity check calculator).
    • Comparing growth: deciding which of two quantities grows faster, like x² versus eˣ.
    • Physics and engineering: simplifying formulas at special values where they seem to break.

    Quick summary

    When a limit gives 0/0 or ∞/∞, differentiate the top and bottom separately and try again. Always check the form first, and never use the quotient rule here. Use the calculator above for limits of the form (xⁿ − aⁿ)/(x − a), with every step shown.

    Worked example

    Your homework asks for the limit of (x² − 9)/(x − 3) as x approaches 3. Plugging in gives 0/0, so you use L’Hôpital’s Rule. This has the form (xⁿ − aⁿ)/(x − a) with n = 2 and a = 3.

    1. 01Limit: lim[x→3] (x^2 − 3^2) / (x − 3)
    2. 02Direct substitution gives 0/0 → indeterminate form
    3. 03Apply L'Hôpital's Rule: differentiate numerator and denominator
    4. 04f(x) = x^2 − 3^2 → f'(x) = 2x^1
    5. 05g(x) = x − 3 → g'(x) = 1
    6. 06lim[x→3] f'(x)/g'(x) = 2x^1|_{x=3}
    7. 07= 2 × 3^1 = 2 × 3 = 6

    These numbers are pre-filled in the calculator above.

    Frequently asked questions

    When can I use L'Hôpital's Rule?

    Only when plugging in gives an indeterminate form: 0/0 or ∞/∞. Other forms like 0 × ∞ must first be rewritten as a fraction.

    Can I use L'Hôpital's Rule more than once?

    Yes. If the new limit is still 0/0 or ∞/∞, differentiate the top and bottom again, as many times as needed.

    Is L'Hôpital's Rule the same as the quotient rule?

    No. The quotient rule finds the derivative of a fraction. L’Hôpital’s Rule finds a limit by differentiating the top and bottom separately.

    #Calculus#University#L'Hôpital's Rule
    Updated

    Keep reading

    Sponsored ToolsAd

    More tools on Ytools →
    Calcu.click — 25+ Free Smart Calculators preview

    Calcu.click — 25+ Free Smart Calculators

    Brand new calculation platform with 0ms reactive math, 100% client-side privacy, and dedicated subdomains. Fast calculators for EMI, SIP, Mortgage, Income Tax, BMI, Age, Percentage, and more.

    25+ CalculatorsFinanceHealth0ms Real-TimeFree
    Keyboard Arena preview

    Keyboard Arena

    Master touch typing with real-time WPM speed tests, mechanical switch audio, A-Z finger biomechanics drills, 40+ structured lessons, and competitive arcade games.

    Typing TestWPMTouch Typing
    Flutter Log Explorer preview

    Flutter Log Explorer

    Real-time structured log viewer and search explorer for Flutter & Dart. Zero-config capture from Debug Adapter (DAP) & Dart VM Service with smart classification and filters.

    FlutterDartVS Code ExtensionOpen VSX