Limit Calculator
Evaluate lim x→a f(x) numerically and visualize the approach from both sides with a table and graph
Function to take the limit of
Limit
Enter a function and an approach point a, then press “Find limit” to see the limit value and how f approaches a.
About this tool
This limit calculator evaluates lim x→a f(x) entirely in your browser. Rather than manipulating the expression algebraically, a safe parser (no eval) turns it into an expression tree, then approaches a from both sides with shrinking steps (h = 0.1, 0.01, …) and judges how the values converge. If both sides converge to the same finite value, the limit is finite; if both diverge to the same infinity, it is +∞ or −∞; if the sides disagree, it reports does-not-exist (DNE) and still shows the one-sided values. It supports x→∞, x→−∞, and one-sided limits. The strength of the numerical method is that even indeterminate forms such as sin(x)/x, where substitution gives 0/0, yield a correct limit from the approach values. The result is a highly accurate numerical approximation, not a symbolic exact value.
How to use
- 1 Enter the function whose limit you want (e.g. sin(x)/x, (x^2-4)/(x-2), 1/x).
- 2 Set the variable (default x) and enter the approach point a. The ∞ / −∞ buttons are available too.
- 3 Choose the direction (both, left, or right) when you want a one-sided limit.
- 4 Press “Find limit” to get the limit value plus a table and graph showing the approach to a.
How it works
The calculator first parses the expression into an abstract syntax tree. For a finite point a, it evaluates the function at a−h and a+h for h = 0.1, 0.01, …, 1e-7 and studies how each one-sided sequence converges. It searches for the most stable plateau (the adjacent pair with the smallest relative gap) to read off the finite limit, snapping to integers or simple fractions when very close. If the magnitude grows monotonically with a constant sign, it reports +∞ or −∞. For x→±∞ it evaluates at x = ±10, 100, …, 1e8 and judges the same way. When the sides give different finite values (a jump), one side is infinite, or the function oscillates, the two-sided limit is reported as does-not-exist (DNE) with the one-sided values shown. Because some functions (e.g. (1−cos x)/x^2) lose accuracy to floating-point cancellation when h is tiny, it uses the most stable segment of the whole sequence rather than the very last point.
Frequently asked questions
What is a numerical limit, and how is it different from symbolic computation?
A numerical limit evaluates the function at points that get closer and closer to the target from each side and reads off where the values are heading, without manipulating the expression algebraically. Unlike symbolic methods (l’Hôpital’s rule, factoring, etc.), it works for any expression and finds the limit even for indeterminate forms like sin(x)/x. The result is a highly accurate approximation rather than an exact closed form.
What is a one-sided limit?
A one-sided limit is the limit as you approach a from only one side. The left limit (x→a⁻) comes from values smaller than a; the right limit (x→a⁺) comes from values larger than a. A two-sided limit exists only when the left and right limits agree. Use the direction segment to pick “Left” or “Right” to investigate a single side.
What does “does not exist (DNE)” mean?
It means the two-sided limit does not exist. Common causes are: (1) the left and right limits are different finite values, a jump (e.g. |x|/x as x→0); (2) one side is +∞ and the other is −∞ (e.g. 1/x as x→0); or (3) the values oscillate without settling (e.g. sin(1/x) as x→0). When the result is DNE, the left and right limits are still shown for reference.
How are limits at infinity (x→∞) computed?
Enter ∞ or −∞ as the approach point (or use the buttons), and the function is evaluated at x = 10, 100, …, 100 million (or their negatives) to decide whether it converges to a finite value or diverges to infinity. For example, (1+1/x)^x → e and 1/x → 0 as x→∞, while x and x^2 diverge to +∞.
Why can it evaluate indeterminate forms like sin(x)/x?
Substituting x=0 gives sin(0)/0 = 0/0, which is undefined, but plugging in values near 0 makes f(x) get arbitrarily close to 1. The numerical limit reads off this approach value, so it finds the correct limit (here 1) even for indeterminate forms like 0/0 or ∞/∞. You can confirm (1−cos x)/x^2 → 1/2 and (e^x−1)/x → 1 the same way.
Related tools and uses
Limits are the foundation of calculus. The derivative calculator computes derivatives, which are defined as limits; the integral calculator computes definite integrals as limits of infinite sums; and the graphing calculator lets you see how a function behaves near the approach point. Use them together to build intuition for the idea of “approaching” that underlies all of calculus.