L’Hôpital’s Rule Calculator

  • Free
  • No sign-up
  • Works on phones
  • Shows the working
Series & Limits#18

L'Hôpital's Rule Evaluator

Resolves \(\tfrac{0}{0}\) and \(\tfrac{\infty}{\infty}\) forms by differentiating top and bottom.

The L’Hôpital’s rule calculator evaluates limits of a quotient \( \frac{f(x)}{g(x)} \) that come out as \( \tfrac00 \) or \( \tfrac{\infty}{\infty} \) when you plug in. You enter the numerator and denominator separately, and it shows each round of differentiation until the limit can be read off.

It is a quick way to check homework, or to see how many applications of the rule a problem really needs. It’s free, with no sign-up.

How to use the L’Hôpital’s rule calculator

  1. Type the numerator \( f(x) \) in the first box and the denominator \( g(x) \) in the second. Use ^ for powers, e^(x) or exp(x), ln(), sin(), sqrt() and pi. Implicit multiplication like 3x works.
  2. Enter the value that \( x \) approaches. You can also type inf or -inf.
  3. Press Apply rule. Each application appears as its own row, showing the new quotient \( \frac{f'}{g'} \). A final Substitute row gives the value, and the limit is highlighted at the bottom.
  4. If the output says there is no indeterminate form, substitution already works and the rule isn’t needed.

Formula

If \( f(c) = g(c) = 0 \), or both tend to \( \pm\infty \), and \( f \) and \( g \) are differentiable near \( c \) with \( g'(x) \ne 0 \) there, then

$$\lim_{x\to c}\frac{f(x)}{g(x)} = \lim_{x\to c}\frac{f'(x)}{g'(x)}$$

whenever the right side exists or is infinite. You differentiate the top and bottom separately, not with the quotient rule. If the new quotient is still \( \tfrac00 \) or \( \tfrac{\infty}{\infty} \), apply the rule again.

The calculator does exactly this at a finite point, up to six rounds, using its symbolic derivative engine. For \( x \to \pm\infty \), or when the rule doesn’t resolve the form, it says so and estimates the limit numerically from values of \( \frac{f}{g} \) instead.

Worked example

Example 1: two applications. Find

$$\lim_{x\to0}\frac{e^{3x} - 1 - 3x}{x^2}.$$

At \( x = 0 \): the top is \( 1 - 1 - 0 = 0 \) and the bottom is 0, so the form is \( \tfrac00 \).

Round 1: \( f'(x) = 3e^{3x} - 3 \) and \( g'(x) = 2x \). At 0 this is \( \frac{3 - 3}{0} = \tfrac00 \) again.

Round 2: \( f''(x) = 9e^{3x} \) and \( g''(x) = 2 \). Now substitution works:

$$\lim_{x\to0}\frac{9e^{3x}}{2} = \frac{9}{2}.$$

This is the example loaded in the calculator above, so you can compare each row with your own work.

Example 2: an answer that isn’t a whole number. Find \( \lim_{x\to0}\frac{2^x - 1}{x} \). The form is \( \tfrac00 \). Since \( \frac{d}{dx}2^x = 2^x\ln 2 \), one round gives

$$\lim_{x\to0}\frac{2^x\ln 2}{1} = \ln 2 \approx 0.693147.$$

Enter 2^x - 1 over x and the calculator shows the result as \( \ln 2 \).

Mistakes to avoid

  • Using the rule when the form isn’t indeterminate. For \( \frac{x^2+3}{x+1} \) at 0, substitution gives \( \frac31 = 3 \). Differentiating anyway would give \( \frac{2x}{1} \to 0 \), which is wrong. Always substitute first, as the calculator does.
  • Using the quotient rule. \( \left(\frac fg\right)' \) is a different object. The rule uses \( \frac{f'}{g'} \).
  • Forgetting other indeterminate forms need rewriting. \( 0\cdot\infty \), \( \infty - \infty \), \( 1^\infty \) and \( 0^0 \) must become a quotient first. For example, \( x\,(e^{1/x} - 1) \) as \( x\to\infty \) is an \( \infty\cdot0 \) form. Rewrite it as \( \frac{e^{1/x}-1}{1/x} \), which is \( \tfrac00 \), and the limit is 1. Enter e^(1/x) - 1 and 1/x with inf to check it.
  • Missing a factor you could cancel. \( \frac{x^2-9}{x^2-2x-3} \) at 3 gives \( \frac32 \) either by the rule or by cancelling \( x - 3 \). Both are fine, and algebra is often faster.

The full reasoning, including why the rule works, is in the guide to L’Hôpital’s rule. Many of the same limits can also be found with Taylor series, and the Taylor series calculator will build the expansions for you.

Related guides

Further reading

FAQ

Does the L’Hôpital’s rule calculator show steps?

Yes. Every application appears as a row with the new numerator and denominator, followed by the substitution that gives the final value.

Can L’Hôpital’s rule be applied more than once?

Yes, as long as each new quotient is still \( \tfrac00 \) or \( \tfrac{\infty}{\infty} \). The calculator repeats it up to six times.

Does it work for limits at infinity?

You can enter inf as the point, and the calculator returns the limit. At infinity it estimates the value numerically instead of listing symbolic rounds. For limits that aren’t quotients, use the limit calculator.

When does L’Hôpital’s rule fail?

It doesn’t apply unless the form is indeterminate. It is also unhelpful when differentiating cycles back to the same form, as with \( \frac{e^x + e^{-x}}{e^x - e^{-x}} \) at infinity. Dividing by \( e^x \) there gives 1 directly.

Embed this calculator on your website

Teachers, tutors and bloggers are welcome to use this calculator for free. Copy the code below and paste it into any page (in WordPress, use a "Custom HTML" block). The small script makes the calculator grow to fit its answer; if your site removes scripts, it still works at a fixed height. Please keep the credit link.

More calculators

See all calculators