Skip to content

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".

Direction both sides
Try:
limx→2 f(x) =
Was this tool helpful?
Give feedback

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:

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.

  1. Try direct substitution: (2² - 4) / (2 - 2) = 0/0, indeterminate.
  2. Factor: x² - 4 = (x - 2)(x + 2).
  3. Cancel the shared (x - 2) factor: the simplified function is x + 2.
  4. Substitute x = 2 into the simplified function: 2 + 2 = 4.
  5. 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).

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.

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:

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:

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?
A limit describes the value a function f(x) gets arbitrarily close to as x gets arbitrarily close to some target value a, without necessarily ever equaling that value. Limits are the foundation calculus is built on: derivatives and integrals are both defined as limits of simpler quantities.
How do I find a limit algebraically?
Try direct substitution first. If that gives a defined number, you're done. If it gives an indeterminate form like 0/0 or ∞/∞, try factoring and canceling common terms (for rational functions), rationalizing a numerator or denominator with a conjugate (for expressions with square roots), or L'Hopital's rule (differentiate the numerator and denominator separately and try substitution again).
What does it mean when a limit does not exist?
It means there is no single number the function approaches as x gets close to the target. This usually happens when the left-hand and right-hand limits disagree, when the function grows without bound (an infinite limit, which some textbooks still call "exists" in the extended sense and report as +∞ or -∞), or when the function oscillates without settling near the target.
Can this calculator solve limits at infinity?
Yes. Type "infinity" or "-infinity" in the target field (or use one of the infinity example chips above the calculator). For a ratio of polynomials, the tool applies the standard degree-comparison rule automatically; for other functions it falls back to a numerical approximation using very large sample values of x.
What is the difference between a one-sided and a two-sided limit?
A two-sided limit (the default here) requires the function to approach the same value whether x comes from below or above the target. A one-sided limit only looks at one direction: from the left (x → a⁻) or from the right (x → a⁺). Use the direction buttons above the calculator to switch between them; this matters most for functions with a vertical asymptote or a jump at the target.
How is this different from a symbolic limit calculator like Mathway or Symbolab?
This tool runs entirely in your browser: your function never leaves your device, there is no account, no paywall for step-by-step output, and no ads inserted into the result. It covers the same core algebraic methods (direct substitution, factoring, degree comparison) plus a transparent numerical fallback for everything else, and it shows the method it used so you can verify the reasoning.
Why does the calculator show a value table below the result?
The table shows f(x) at several points that shrink toward your target from both sides, which is exactly the intuition behind the formal definition of a limit: as x gets closer to a, f(x) gets closer to L. It's a quick sanity check on the algebraic answer and it's the clearest way to see a limit that does not exist, since the left and right columns will visibly disagree.
Does this tool support trigonometric and exponential functions?
Yes: sin, cos, tan, exp, ln, log, sqrt, and the constants pi and e are all supported in the function field, alongside standard arithmetic and exponents (use ^ for powers, e.g. x^2).

Try it now

Type any function and see the limit, with every solving step, right in your browser.

Go to the calculator

Free. No sign-up.