Calculus tool
Limit Calculator
Type a function of x and a value it approaches, and this calculator finds the limit instantly, showing exactly which method it used: direct substitution, algebraic factoring, degree comparison for infinite limits, or a numerical approximation when no exact algebraic shortcut applies. It handles one-sided limits (from the left or right), two-sided limits, and limits at positive or negative infinity, and it shows a short table of function values as x closes in on the target so you can see the trend with your own eyes, not just trust a black-box answer.
Use a number, "pi", "-infinity" or "infinity".
Steps
| x | f(x) |
|---|
How this limit calculator solves lim f(x)
Finding limx→a f(x) by hand usually means picking the right technique for the shape of the function in front of you. This tool automates that choice and shows its work, in this order:
- Direct substitution first: if f(a) is defined and the function is continuous there, the limit is just f(a). Fast, exact, and the method taught first in every calculus course.
- Algebraic factoring next: for a rational function that gives 0/0 at direct substitution (a removable discontinuity, like (x²-4)/(x-2) at x=2), the calculator factors numerator and denominator, cancels the common root, and substitutes into the simplified expression.
- Degree comparison for limits at infinity: for a rational function as x→∞ or x→-∞, the calculator compares the degrees of the numerator and denominator polynomials. Higher denominator degree gives 0, equal degrees gives the ratio of the leading coefficients, and higher numerator degree gives a signed infinity.
- Numerical approximation as the fallback: for anything else (trig functions, exponentials, functions with no clean algebraic shortcut) the calculator samples f(x) at points that shrink toward the target from both sides and checks whether the values converge, diverge to infinity, or disagree from the left and right.
Worked example: a 0/0 removable discontinuity
Consider limx→2 (x² - 4) / (x - 2). Substituting x = 2 directly gives 0/0, an indeterminate form, so direct substitution alone doesn't answer the question. The calculator factors the numerator as a difference of squares: x² - 4 = (x - 2)(x + 2). The (x - 2) factor cancels top and bottom, leaving f(x) = x + 2 for every x except x = 2 itself. Substituting x = 2 into the simplified expression gives 2 + 2 = 4. The original function has a hole at x = 2 (it's undefined exactly there), but the limit still exists and equals 4, because a limit only cares about the values near the point, not the value at it.
- Try direct substitution: (2² - 4) / (2 - 2) = 0/0, indeterminate.
- Factor: x² - 4 = (x - 2)(x + 2).
- Cancel the shared (x - 2) factor: the simplified function is x + 2.
- Substitute x = 2 into the simplified function: 2 + 2 = 4.
- Conclusion: the limit is 4, even though f(2) itself is undefined.
Worked example: a limit at infinity
Consider limx→∞ (3x² + 1) / (x² - 5). As x grows without bound, only the highest-degree terms matter for the overall behavior of a rational function, because every lower-degree term becomes negligible in comparison. Both the numerator and denominator here have degree 2, so the limit is simply the ratio of their leading coefficients: 3 / 1 = 3. This is the degree-comparison rule the calculator applies automatically whenever the target is infinity and both sides are polynomials (or polynomial ratios).
- Numerator degree greater than denominator degree: the limit is +∞ or -∞ (a signed infinity, not a finite number).
- Numerator degree = denominator degree: the limit is the ratio of the leading coefficients (as in the example above).
- Numerator degree less than denominator degree: the limit is 0, since the denominator grows faster than the numerator.
When a limit does not exist (DNE)
Not every limit produces a clean number, and this calculator is honest about that instead of forcing a fabricated answer. A one-sided limit like limx→0⁺ 1/x grows without bound as x shrinks toward 0 from the positive side, so the calculator reports +∞: a real, useful answer, but not a finite value. If the left-hand and right-hand limits genuinely disagree (for example limx→0 |x|/x, which approaches -1 from the left and +1 from the right), the two-sided limit does not exist at all, and the calculator reports that directly instead of averaging the two sides or picking one arbitrarily.
- Vertical asymptote: the function grows without bound near the target (reported as +∞ or -∞, a one-sided or two-sided infinite limit).
- Jump discontinuity: the left-hand and right-hand limits are both finite but different from each other, so the two-sided limit does not exist.
- Oscillation: the function keeps oscillating near the target without settling on a single value (classic example: sin(1/x) as x→0).
Reading the result: method badge and value table
Every answer on this page comes with a small method label ("exact, direct substitution", "exact, algebraic simplification", "exact, degree comparison", or "numerical approximation") so you know exactly how confident to be in the result and can double-check the reasoning yourself, and a compact table of f(x) values at points that shrink toward the target from both sides, letting you see the convergence (or the disagreement, for a limit that does not exist) directly in the numbers rather than taking the final answer on faith.
Limit laws: how limits combine
If limx→a f(x) = L and limx→a g(x) = M both exist as finite numbers, a small set of rules (the limit laws) let you break a complicated expression into simpler pieces instead of evaluating the whole thing from scratch. These are the rules every algebraic method on this page ultimately relies on:
- Sum rule: lim [f(x) + g(x)] = L + M.
- Difference rule: lim [f(x) - g(x)] = L - M.
- Product rule: lim [f(x) · g(x)] = L · M.
- Quotient rule: lim [f(x) / g(x)] = L / M, provided M ≠ 0 (if M = 0, you're in indeterminate-form territory and need factoring, L'Hopital's rule, or a numerical check instead).
- Constant multiple rule: lim [c · f(x)] = c · L, for any constant c.
- Power rule: lim [f(x)]ⁿ = Lⁿ, for any positive integer n.
- Squeeze theorem: if g(x) ≤ f(x) ≤ h(x) near a (except possibly at a itself) and lim g(x) = lim h(x) = L, then lim f(x) = L too. This is exactly how the classic result lim<sub>x→0</sub> sin(x)/x = 1 is proven formally, even though direct substitution and factoring both fail on it.
Special trigonometric limits worth memorizing
A handful of trigonometric limits show up constantly in calculus courses and don't reduce to plain algebra, because they involve a 0/0 form with a transcendental function. This calculator handles them with the numerical fallback (or, for the L'Hopital-style forms, on the dedicated L'Hopital's rule calculator), but it's worth recognizing the pattern by sight:
- lim<sub>x→0</sub> sin(x)/x = 1 (not 0/0's usual undefined result; this is the building block for every derivative of a trig function).
- lim<sub>x→0</sub> (1 - cos(x))/x = 0.
- lim<sub>x→0</sub> (1 - cos(x))/x² = 1/2.
- lim<sub>x→0</sub> tan(x)/x = 1 (follows directly from the sin(x)/x result, since tan(x) = sin(x)/cos(x) and cos(0) = 1).
Limitations of the numerical fallback (and why the tool tells you which method it used)
Sampling f(x) at shrinking distances from the target is a reliable way to approximate a limit, but it's still an approximation, not a proof, which is exactly why every result on this page is labeled with the method that produced it. A numerical approximation can occasionally be misled by a function that changes behavior at an extremely fine scale below the smallest step size tested, or by floating-point rounding error very close to the target. For any rational function (a ratio of polynomials), the calculator always prefers the exact algebraic route (direct substitution, factoring, or degree comparison) over the numerical fallback, precisely because an exact method has no such edge cases.
Continuity and limits: why direct substitution usually works first
A function f is continuous at a point a exactly when limx→a f(x) = f(a): the limit exists, the function is defined there, and the two values agree. That's precisely why the calculator always tries direct substitution first. Polynomials, and most combinations of polynomials, trig functions, exponentials, and logarithms (away from their domain restrictions, such as dividing by zero or taking the log of a non-positive number) are continuous everywhere they're defined, so plugging in the target value gives the correct limit immediately in the large majority of cases. The interesting calculus problems, the ones that actually need factoring, degree comparison, or L'Hopital's rule, are specifically the points where continuity breaks down: removable discontinuities (holes), asymptotes, and the boundary behavior as x runs off to infinity.
Using constants and decimals in the target field
The target field accepts more than plain integers. You can type a decimal (2.5), a negative number (-3), the constant pi for problems built around trigonometric periods, or e for problems involving the natural exponential. The function field accepts the same set of constants and functions, so an expression like sin(x) / (x - pi) with a target of pi is valid input, and the calculator parses it exactly the same way it parses a plain polynomial.
Related limit tools on this site
Two calculus problems don't fit this general-purpose calculator's single-variable approach, so they each get their own dedicated tool: an indeterminate form that needs L'Hopital's rule and symbolic differentiation to resolve cleanly, and a two-variable limit that needs to be checked along several different approach paths at once, since a single substitution can never prove a multivariable limit exists. If your function only blows up as x grows without bound, the dedicated limit at infinity calculator walks through the degree-comparison rule on its own, with more worked examples than fit on this page.
Frequently asked questions
What is a limit in calculus?
How do I find a limit algebraically?
What does it mean when a limit does not exist?
Can this calculator solve limits at infinity?
What is the difference between a one-sided and a two-sided limit?
How is this different from a symbolic limit calculator like Mathway or Symbolab?
Why does the calculator show a value table below the result?
Does this tool support trigonometric and exponential functions?
Try it now
Type any function and see the limit, with every solving step, right in your browser.
Go to the calculatorFree. No sign-up.