Limit Calculator
Two-sided, one-sided and infinite limits with L'Hôpital steps and a table of values
A limit calculator finds the value f(x) approaches as x gets close to a point, from both sides, from one side, or as x grows without bound. Enter sin(x)/x with x → 0 and this one spots the 0/0 form, applies L'Hôpital's rule once and returns 1, then confirms the answer with a table of values from the left and the right.
Last updated October 2026
Method: Direct substitution first. For 0/0 and ∞/∞ forms, L'Hôpital's rule with exact derivatives from the mathjs library, up to five applications; 0·∞, 1^∞, 0^0 and ∞^0 forms are rewritten as quotients or with logarithms. Every result is cross-checked against values from each side, and when no symbolic step applies, the answer is a clearly labeled numerical estimate.
Included: Two-sided and one-sided limits, limits at ∞ and −∞, infinite limits, jumps, oscillation and domain gaps, exact values such as 1/2, e or π/2, and a table of values approaching the point.
Not included: Limits in several variables, recursively defined sequences, symbolic parameters and complex limits. ∞ − ∞ forms are estimated numerically rather than simplified algebraically.
→ Enter the limit
Use ^ for powers, * or a space for multiplication, sqrt(), e^x, ln(x), sin, cos, tan, abs(). ln(x) is the natural log and log(x) is base 10, as on handheld calculators. Piecewise functions work with the form condition ? value : value, for example x < 0 ? -1 : x^2.
lim x→0 of sin(x)/x
📋 Step-by-step
- 1. Substitution gives the indeterminate form 0/0A 0/0 form says nothing about the limit by itself, so L'Hôpital's rule applies: the limit of f/g equals the limit of f′/g′.numerator → 0, denominator → 0
- 2. L'Hôpital's rule, application 1 (0/0 form)Differentiate the numerator and the denominator separately: (sin(x))′ = cos(x) and (x)′ = 1.lim x→0 sin(x)/x = lim x→0 cos(x)/1
- 3. Substitutecos(x) → 1 as x → 0, so the limit is 1/1 = 1
🔢 Table of values approaching 0
| x (left) | f(x) | x (right) | f(x) |
|---|---|---|---|
| -0.1 | 0.99833417 | 0.1 | 0.99833417 |
| -0.01 | 0.99998333 | 0.01 | 0.99998333 |
| -0.001 | 0.99999983 | 0.001 | 0.99999983 |
| -0.0001 | 1 | 0.0001 | 1 |
| -10^-5 | 1 | 10^-5 | 1 |
| -10^-6 | 1 | 10^-6 | 1 |
| -10^-7 | 1 | 10^-7 | 1 |
| -10^-8 | 1 | 10^-8 | 1 |
| -10^-9 | 1 | 10^-9 | 1 |
Each row moves 10 times closer to the point.
Limit calculator: how limits are found, with worked examples
Limits are the foundation of calculus: derivatives, integrals and continuity are all defined through them. This limit calculator evaluates the limit of a function the way a careful student would. It substitutes first, uses L'Hôpital's rule when substitution produces an indeterminate form, and then checks the answer against actual function values from each side, so every result comes with both a reason and evidence.
What a limit means
The statement lim f(x) = L as x → a means that f(x) can be made as close to L as you like by taking x close enough to a, but not equal to a. The value f(a) itself plays no role; it may be different from L or not exist at all. A left-hand limit, written x → a⁻, uses only values below a, and a right-hand limit, x → a⁺, only values above it. The two-sided limit exists exactly when both one-sided limits exist and agree. A limit at infinity describes f(x) as x grows without bound, and an infinite limit describes f(x) itself growing without bound.
How the calculator evaluates a limit
Substitution comes first: if f is continuous at a, the limit is simply f(a). When substitution gives 0/0 or ∞/∞, the calculator applies L'Hôpital's rule, differentiating the numerator and denominator separately with the mathjs derivative function. Products of the form 0·∞ are rewritten as quotients, and powers of the form 1^∞, 0^0 or ∞^0 are handled through their logarithm:
lim f(x)/g(x) = lim f′(x)/g′(x) for 0/0 or ∞/∞ forms lim f(x)·g(x) = lim g(x)/(1/f(x)) when f → 0 and g → ∞ lim f(x)^g(x) = e^L, where L = lim g(x)·ln f(x) The first line is L'Hôpital's rule as stated in the NIST Digital Library of Mathematical Functions, which also requires g′(x) to be nonzero near a. Whatever the symbolic route, the calculator evaluates f at points 10 times closer to a in each row, from both sides, and compares. If the table contradicts a substitution, as it does at a jump, the table wins and the reason is shown.
Worked example 1: a 0/0 form that factors
Take lim (x^2 − 9)/(x − 3) as x → 3. Substituting gives 0/0, which says nothing yet. Factoring the numerator as (x − 3)(x + 3) and canceling leaves x + 3 for every x except 3, so the limit is 6. L'Hôpital's rule gets there too: the derivatives are 2x and 1, and 2·3/1 = 6. The calculator shows the L'Hôpital route, and its table confirms it: its steps toward 3 are 3 × 0.1, 3 × 0.01 and so on, so it lists f(2.7) = 5.7, f(2.97) = 5.97 and f(2.997) = 5.997 from the left and f(3.3) = 6.3, f(3.03) = 6.03 and f(3.003) = 6.003 from the right. The hole at x = 3 does not change the limit.
Worked example 2: two applications of L'Hôpital's rule
For lim (1 − cos(x))/x^2 as x → 0, substitution gives 0/0. One application of the rule gives sin(x)/(2x), still 0/0. A second gives cos(x)/2, and substituting x = 0 gives 1/2:
(1 − cos(x))/x^2 → sin(x)/(2x) → cos(x)/2 → 1/2 The NIST library lists this limit as equation 4.17.3, next to lim sin(x)/x = 1 as equation 4.17.1. The calculator reports the method as two applications of L'Hôpital's rule and recognizes 0.5 as exactly 1/2.
Worked example 3: a limit at infinity
For lim (3x^2 + 1)/(x^2 − 4) as x → ∞, divide every term by x^2 to get (3 + 1/x^2)/(1 − 4/x^2). Both small fractions vanish, so the limit is 3, the ratio of the leading coefficients. The calculator sees ∞/∞, applies L'Hôpital's rule once to get 6x/(2x), cancels the common factor x to get 3, and lists f(10) = 3.1354167, f(100) = 3.0013005, f(1,000) = 3.000013 and f(10,000) = 3.0000001. The same reasoning gives 0 when the denominator has the higher degree and an infinite limit when the numerator does.
One-sided limits and limits that do not exist
A limit can fail to exist in several distinct ways, and the calculator names the one it finds:
- Infinite in opposite directions. 1/x tends to −∞ from the left of 0 and ∞ from the right, so only the one-sided limits exist (as infinite limits).
- A jump. |x|/x is −1 to the left of 0 and 1 to the right; floor(x) at 2 has left limit 1 and right limit 2, even though floor(2) = 2.
- Oscillation. sin(1/x) swings between −1 and 1 infinitely often near 0 and never settles, while x^2·sin(1/x) is squeezed to 0 because its size never exceeds x^2.
- A domain edge. sqrt(x) is undefined left of 0. Its right-hand limit is 0; some courses call that the limit, others say the two-sided limit does not exist, and the calculator explains both readings.
To compute a one-sided limit, choose from the left or from the right. At ±∞ there is only one direction, so the choice is disabled.
Indeterminate products and powers
For x·ln(x) as x → 0⁺, substitution gives 0·(−∞). Rewritten as ln(x)/(1/x), it becomes −∞/∞, and L'Hôpital's rule gives (1/x)/(−1/x^2), which simplifies to −x and tends to 0, the case a = 1 of NIST equation 4.4.14. For (1 + 1/x)^x as x → ∞, substitution gives 1^∞. Its logarithm is x·ln(1 + 1/x), a 0·∞ form; as ln(1 + 1/x)/(1/x) it is 0/0, one application of the rule leads to 1/(1/x + 1), which tends to 1, and the limit is e^1 = e, about 2.718281828 (NIST equation 4.4.18). The table shows how slowly the sequence gets there: the gap to e shrinks by roughly a factor of 10 per row, about e/(2n).
| n | (1 + 1/n)^n | e minus value |
|---|---|---|
| 1 | 2 | 7.183 × 10−1 |
| 10 | 2.59374246 | 1.245 × 10−1 |
| 100 | 2.704813829 | 1.347 × 10−2 |
| 1,000 | 2.716923932 | 1.358 × 10−3 |
| 10,000 | 2.718145927 | 1.359 × 10−4 |
| 100,000 | 2.718268237 | 1.359 × 10−5 |
| 1,000,000 | 2.718280469 | 1.359 × 10−6 |
| 10,000,000 | 2.718281693 | 1.359 × 10−7 |
Why a table of values can mislead
Plugging in numbers ever closer to the point is a good check, but computers round to about 16 significant digits, and very close to the point the rounding takes over. The table below uses the same double-precision arithmetic as any browser. sin(x)/x behaves well, but (1 − cos(x))/x^2 drifts away from 1/2 below x = 10−4 and collapses to 0 at x = 10−8, because cos(10−8) rounds to exactly 1.
| x | sin(x)/x | (1 − cos(x))/x^2 |
|---|---|---|
| 0.1 | 0.9983341665 | 0.4995834722 |
| 0.01 | 0.9999833334 | 0.4999958333 |
| 0.001 | 0.9999998333 | 0.4999999583 |
| 10−4 | 0.9999999983 | 0.499999997 |
| 10−5 | 1 | 0.5000000414 |
| 10−6 | 1 | 0.5000444503 |
| 10−7 | 1 | 0.4996003611 |
| 10−8 | 1 | 0 |
| 10−9 | 1 | 0 |
Both functions are even, so the left side gives the same numbers. A naive tool would read the last rows and report 0. This calculator looks for the point where the values stop converging smoothly, extrapolates from the rows before it, and prefers the exact L'Hôpital result whenever one exists.
Common limits and how the calculator resolves them
Every entry was produced by the calculator; the last column summarizes the route shown in its steps.
| f(x) | x → | Limit | How it is found |
|---|---|---|---|
| sin(x)/x | 0 | 1 | L'Hôpital's rule (1 application) |
| (1 − cos(x))/x^2 | 0 | 1/2 | L'Hôpital's rule (2 applications) |
| (x^2 − 9)/(x − 3) | 3 | 6 | L'Hôpital's rule (1 application) |
| (sqrt(x + 4) − 2)/x | 0 | 1/4 | L'Hôpital's rule (1 application) |
| (x − sin(x))/x^3 | 0 | 1/6 | L'Hôpital's rule (3 applications) |
| (3x^2 + 1)/(x^2 − 4) | ∞ | 3 | L'Hôpital's rule (1 application) |
| (1 + 1/x)^x | ∞ | e ≈ 2.718281828 | Logarithm, then L'Hôpital's rule (1 application) |
| ln(x)/x | ∞ | 0 | L'Hôpital's rule (1 application) |
| x·ln(x) | 0+ | 0 | Rewrite as a quotient, then L'Hôpital's rule |
| x^x | 0+ | 1 | Logarithm, then L'Hôpital's rule (1 application) |
| sqrt(x^2 + x) − x | ∞ | 1/2 | Numerical estimate (∞ − ∞ form) |
| 1/x | 0 | does not exist | Left −∞, right ∞ |
| 1/x^2 | 0 | ∞ | Same sign from both sides |
| |x|/x | 0 | does not exist | Left −1, right 1 |
| sin(1/x) | 0 | does not exist | Oscillates between −1 and 1 |
| x^2·sin(1/x) | 0 | 0 | Numerical estimate (squeezed to 0) |
How to use the calculator
Type the function with ^ for powers, * or a space for multiplication, and names such as sqrt, e^x, ln, sin, cos, tan and abs; ln is the natural logarithm and log is base 10, as on handheld calculators, and piecewise functions use the form condition ? value : value. Enter the point as a number, an expression like pi/2, or inf and -inf, and choose two-sided, from the left or from the right. The result card gives the limit, the method and both one-sided results; the steps card shows each substitution, rewrite and derivative; the table shows nine rows of values from each side, with rows that are dominated by rounding grayed out. Used this way it is a limit of a function calculator and a one-sided limit calculator in one: the direction buttons switch between the two-sided limit and the limits from the left and the right.
Who it is for. Precalculus, Calculus I and AP Calculus students use it to check limit homework and to see where L'Hôpital's rule applies. Teachers use the table and the round-off example to show why numerical evidence is not proof. Engineers and scientists use limits at infinity to read off the long-run behavior of a model, such as the level a concentration settles at.
Key terms
- Indeterminate form: an expression such as 0/0, ∞/∞, 0·∞, ∞ − ∞, 1^∞, 0^0 or ∞^0 whose limit cannot be read off by substitution.
- Continuous function: one whose limit at a equals f(a), so substitution works.
- Removable discontinuity: a hole where the limit exists but differs from f(a) or f(a) is undefined.
- Jump discontinuity: a point where the one-sided limits exist but differ.
- Vertical asymptote: a line x = a near which f(x) grows without bound.
- Squeeze theorem: if g ≤ f ≤ h near a and g and h share a limit, f has that limit too.
What changes the result, and limitations
The direction matters whenever the function behaves differently on each side, so check one-sided limits at asymptotes, jumps and domain edges. Radians matter for every trigonometric limit. A tiny change to the function can change the form completely: (x^2 − 9)/(x − 3) has a limit at 3, while (x^2 + 9)/(x − 3) has none. The calculator handles one variable and real numbers only, simplifies ∞ − ∞ forms numerically rather than algebraically, and uses double-precision arithmetic, so numerical estimates are shown to 7 significant digits and labeled as estimates.
Related calculators
- Every derivative is a limit of a difference quotient; compute derivatives with steps in the Derivative Calculator.
- Improper integrals are limits too; evaluate them in the Integral Calculator.
- To see why sin(x)/x tends to 1, compare it with its series in the Taylor Series Calculator.
- To spot asymptotes and holes visually, plot the function with the Graphing Calculator.
- For the average rate of change, the quantity a derivative takes the limit of, use the Rate of Change Calculator.
- For sums of infinitely many terms, a limit of partial sums, use the Geometric Sequence Calculator.
Sources
The rules are standard results of calculus; every value and method on this page was produced by the calculator.
- NIST Digital Library of Mathematical Functions, §1.4 Calculus of One Variable: continuity (§1.4(ii)) and L'Hôpital's rule (1.4.14 and 1.4.15).
- NIST DLMF §4.4 Special Values and Limits: x^a·ln(x) → 0 as x → 0 (4.4.14) and (1 + 1/n)^n → e (4.4.18).
- NIST DLMF §4.17 Special Values and Limits: sin(z)/z → 1 (4.17.1) and (1 − cos(z))/z^2 → 1/2 (4.17.3).
- mathjs derivative function, used for every L'Hôpital step.
⚠️ Common mistakes & edge cases
Stopping at 0/0
A 0/0 result from substitution does not mean the limit is undefined. It means more work is needed: factor, rationalize or apply L'Hôpital's rule. (x^2 − 9)/(x − 3) gives 0/0 at 3 and has the limit 6.
Using L'Hôpital's rule on a form that is not indeterminate
(x + 1)/x at 0 is 1/0, not 0/0. Differentiating anyway gives 1/1 = 1, which is wrong: the left-hand limit is −∞, the right-hand limit is ∞, and the limit does not exist.
Confusing f(a) with the limit
The piecewise function x == 0 ? 5 : x equals 5 at 0 but approaches 0. The calculator notices that substitution and the table disagree and reports 0, with a note explaining the discontinuity.
Checking only one side
Values of 1/x for x = 0.1, 0.01 and 0.001 suggest ∞, but the values for negative x go to −∞. Check both sides before writing a two-sided answer.
Treating ∞ as a number
sqrt(x^2 + x) − x looks like ∞ − ∞ = 0 as x → ∞, but the limit is 1/2. Multiply by the conjugate to see it: the expression equals x/(sqrt(x^2 + x) + x).
Measuring angles in degrees
lim sin(x)/x = 1 holds in radians. With x in degrees the limit is π/180, about 0.01745329252, and every trigonometric derivative changes with it.
❓ Frequently asked questions
How do I use this limit calculator?
Type the function, such as (x^2 - 9)/(x - 3), enter the value x approaches (a number, an expression like pi/2, or inf), and choose two-sided, from the left or from the right. The result card shows the limit and the method, the steps card shows each substitution or L'Hôpital step, and the table lists f(x) as x closes in from each side.
How does a limits calculator find the limit of a function?
It substitutes the point first. If that gives a 0/0 or ∞/∞ form, it applies L'Hôpital's rule with exact derivatives, up to five times, and it rewrites 0·∞, 1^∞, 0^0 and ∞^0 forms first. Every answer is checked against a table of values from both sides, and when no symbolic step works the result is a numerical estimate, labeled as such.
What is a one-sided limit?
A left-hand limit, written x → a⁻, uses only values of x below a; a right-hand limit, x → a⁺, uses only values above a. For |x|/x at 0, the left-hand limit is −1 and the right-hand limit is 1. The two-sided limit exists only when both one-sided limits exist and agree.
When does a limit not exist?
When the one-sided limits differ, as for |x|/x or floor(x) at an integer; when the function grows without bound in opposite directions, as 1/x does at 0; when it oscillates without settling, as sin(1/x) does near 0; or when the function is not defined near the point at all.
What is L'Hôpital's rule?
If f(x)/g(x) gives 0/0 or ∞/∞ at the point, its limit equals the limit of f′(x)/g′(x), provided that limit exists and g′(x) is not zero near the point. For sin(x)/x at 0, the derivatives give cos(x)/1, which tends to 1. The rule does not apply to any other form.
How do you find a limit at infinity?
For a ratio of polynomials, divide top and bottom by the highest power of x. In (3x^2 + 1)/(x^2 − 4), that leaves (3 + 1/x^2)/(1 − 4/x^2), which tends to 3. The values confirm it: about 3.135416667 at x = 10 and 3.000013 at x = 1,000. Type inf or -inf as the point.
Can a limit exist where the function is undefined?
Yes. (x^2 − 9)/(x − 3) is undefined at x = 3, yet its limit there is 6, because for every other x it equals x + 3. A limit describes the values near the point and ignores the value at the point, which is also why a jump in a piecewise function can make direct substitution wrong.
Why does the calculator say a result appears to equal a number?
That label means the answer is a numerical estimate from the table of values and matches a simple constant, such as 1/2 or e, to within about two parts per million. It is strong evidence rather than a proof; answers from substitution or L'Hôpital's rule are labeled as exact instead.
What is the limit of sin(x)/x as x approaches 0?
It is 1, provided x is measured in radians. The NIST Digital Library of Mathematical Functions lists it as equation 4.17.1. With x in degrees the same limit is π/180, about 0.01745329252, which is one reason calculus always works in radians.
What does it mean when a limit is infinity?
It means f(x) grows without bound as x approaches the point. Strictly, the limit does not exist as a real number, and writing ∞ describes how it fails. 1/x^2 tends to ∞ from both sides of 0, while 1/x tends to −∞ from the left and ∞ from the right, so its two-sided limit does not exist.
💡 Good to know
A limit never looks at the point itself
Changing or deleting the single value f(a) cannot change the limit at a. That is what makes limits useful for holes such as the one in (x^2 − 9)/(x − 3), and it is why continuity is defined as "the limit equals the value".
e is itself a limit
The number e = 2.718281828... is the limit of (1 + 1/n)^n, the value continuously compounded interest approaches. Even with n = 10,000,000 the expression is still about 1.4 × 10−7 short of e.
Derivatives are limits
f′(a) is the limit of (f(a + h) − f(a))/h as h → 0, always a 0/0 form. Entering that quotient for a specific function, such as ((2 + h)^2 − 4)/h with h → 0, returns the derivative of x^2 at 2, which is 4.