Black Friday: 50% off every paid plan with code BF50. Ends 5 December.

See prices

Free tool

Asymptote calculator, with the rule and a graph.

Type a function like (2x^2 + 3x − 1)/(x − 4), ln(x − 2), e^x/(e^x + 1) or tan(x) and get its vertical asymptotes, its horizontal or slant asymptote, any holes, and the intercepts. For fractions of polynomials the steps show the common factor cancelled, the bottom set to 0 and the degree comparison, with exact fractions. For logs, powers of e, trig and roots, each place and each end is tested with numbers. A graph draws the curve with the asymptotes dashed.

Need a custom tool, app or website? Contact us 

Use ^ for powers and put brackets round the top and the bottom, like (x^2 − 9)/(x^2 − x − 6). For other functions use ln(x), log(x), e^x, 2^x, sqrt(x), abs(x), sin(x), cos(x) and tan(x). Angles are in radians.

Worked out in your browser. Nothing is sent anywhere.

Guide

How to find asymptotes, with worked examples.

An asymptote is a line that a graph gets closer and closer to without reaching it. This asymptote calculator takes a rational function, a fraction with x in the top and bottom, and finds its vertical asymptotes, its horizontal or slant asymptote, and any holes. It shows which rule it used, the intercepts and a graph with the asymptotes dashed. It also works for functions with logs, e^x, 2^x, square roots, absolute values and trig, such as ln(x − 2), e^x/(e^x + 1) and tan(x), which are explained further down.

How to use the asymptote calculator

  1. Type the function in Function f(x), with brackets round the top and the bottom: (x^2 − 9)/(x^2 − x − 6).
  2. Or press one of the example buttons, such as Slant, Horizontal, Hole, Curved or tan(x).
  3. Read the big cards for the vertical and the horizontal or slant asymptote. The smaller cards give holes and intercepts.
  4. Open Steps to see the factor cancelled, the bottom set to 0 and the degree comparison. Copy result copies the asymptotes as one line, and Copy link copies a link that opens the same function.

Vertical asymptotes

First cancel any factor that the top and the bottom share. Then set the bottom equal to 0 and solve. Each real solution is a vertical asymptote, because the top is not 0 there and the fraction blows up to plus or minus infinity. For (3x + 1) ÷ (x² − 4) the bottom is 0 at x = 2 and x = −2, so both are vertical asymptotes. The page also tells you whether the graph shoots up or down on each side.

Horizontal asymptotes: compare the degrees

Top degree vs bottom degreeResult
Top is smallerhorizontal asymptote y = 0
Equaly = leading coefficient of the top ÷ leading coefficient of the bottom
Top is exactly one moreno horizontal asymptote, but a slant one (divide the top by the bottom)
Top is two or more aboveno horizontal or slant asymptote, the graph follows a curve

For (2x² + 1) ÷ (x² − 5x + 6) both degrees are 2, so y = 2 ÷ 1 = 2. The bottom factors as (x − 2)(x − 3), so the vertical asymptotes are x = 2 and x = 3.

Worked example: a slant asymptote

Take (2x² + 3x − 1) ÷ (x − 4). The top has degree 2 and the bottom has degree 1, so there is a slant asymptote. Divide: 2x² + 3x − 1 = (x − 4)(2x + 11) + 43. The quotient 2x + 11 is the slant asymptote, y = 2x + 11, and the leftover 43 ÷ (x − 4) goes to 0 for large x. The vertical asymptote is x = 4.

Worked example: a hole

Take (x² − 9) ÷ (x² − x − 6). The top is (x − 3)(x + 3) and the bottom is (x − 3)(x + 2). The factor x − 3 cancels, so there is a hole at x = 3, not an asymptote. Put x = 3 into what is left, (x + 3) ÷ (x + 2), to get the height of the hole: 6 ÷ 5 = 1.2. The vertical asymptote is x = −2 and the horizontal one is y = 1. The graph shows the hole as an open circle.

Logs, e^x, trig and roots

When the function is not a plain fraction of polynomials, the calculator works out where a vertical asymptote could be and then tests those places with numbers. The candidates are where a bottom is 0, where the inside of a log is 0, and where cos or sin is 0 for tan, sec, csc and cot. At each candidate it looks at values very close on the left and the right. If they grow without limit, that is a vertical asymptote and the page says whether the graph goes to +∞ or −∞ on each side. If the values settle on one number and the function is undefined there, it is a hole.

FunctionVerticalEnds
ln(x − 2) + 1x = 2 (goes to −∞ from the right, not defined on the left)no horizontal asymptote, grows slowly to +∞
e^x/(e^x + 1)noney = 1 on the right, y = 0 on the left
2e^x/(e^x − 1)x = 0y = 2 on the right, y = 0 on the left
tan(x)x = π/2 + kπ for every whole number kno limit, it keeps swinging
sin(x)/xnone, a hole at (0, 1)y = 0 on both ends

The two ends of the graph are tested by putting in large values, from ±5 up to ±1,000,000. If the values settle on one number, that is a horizontal asymptote, and the page lists the value for the right and the left end separately, since they can differ. If f(x) divided by x settles on a number and f(x) minus that number times x settles too, that is a slant asymptote. A table under the result shows the values so you can see it for yourself. These end results come from numbers and are not a proof. On 24 Oct 2026 they were compared with the exact limits from the computer algebra system SymPy for 38 functions, and all 76 end limits matched. A function that grows very slowly toward a limit, like 1/ln(x), may be reported as unclear.

When the graph crosses an asymptote

A vertical asymptote can never be crossed, because the function does not exist there. A horizontal or slant asymptote only describes what happens far out to the left and right, so the graph may cross it near the middle. That is normal.

Common problems

  • Missing brackets. 2x^2 + 3x − 1/(x − 4) divides only the last term. Write (2x^2 + 3x − 1)/(x − 4).
  • Not cancelling first. A factor that is in both the top and the bottom is a hole. The page cancels it for you and says so.
  • Irrational roots. If the bottom does not factor nicely, such as x² − 2, the asymptotes are at x = ±1.4142, shown as decimals.

To draw the function with the asymptotes, use the graphing calculator. To find the roots of the bottom with a formula, see the quadratic formula calculator.

Questions

Good to know.

What is an asymptote?

A line that a curve gets closer to as x or y grows very large, without touching it at that end. A function can have vertical, horizontal and slant asymptotes.

How do I find a vertical asymptote?

Cancel any common factor, set the bottom of the fraction equal to 0 and solve. Each real solution is a vertical asymptote.

How do I find a horizontal asymptote?

Compare the degrees of the top and bottom. If the top is smaller it is y = 0. If they are equal it is the ratio of the leading coefficients. If the top is bigger there is none.

How do I find a slant asymptote?

Use it when the top is exactly one degree higher than the bottom. Divide the top by the bottom with long division. The quotient, without the remainder, is the line.

What is a hole in a graph?

A single missing point where a factor cancels from the top and bottom. The function is not defined there, but the graph has no asymptote.

Can a graph cross a horizontal asymptote?

Yes. A horizontal asymptote only describes the ends of the graph. It can be crossed any number of times in the middle.

Can a function have both a horizontal and a slant asymptote?

Not for a rational function. The degrees decide: at most one of the two applies. Other functions can have different ones on the two ends, like e^x/(e^x + 1) with y = 1 on the right and y = 0 on the left.

How do I type the function?

Use ^ for powers, brackets round the top and the bottom, and * is optional. For example (x^2 − 9)/(x^2 − x − 6). Use ln(x), e^x, sqrt(x), abs(x) or tan(x) for other functions.

Does it work for ln(x), e^x and tan(x)?

Yes. ln(x) has a vertical asymptote at x = 0. e^x has the horizontal asymptote y = 0 on the left. tan(x) has vertical asymptotes at x = π/2 + kπ. The page tests each one with numbers and tells you which side the graph goes up or down.

Are the answers for these functions exact?

Places for vertical asymptotes come from the formula, and the behaviour near them is tested with numbers. The end behaviour is found with large numbers, not proved. Fractions of polynomials are solved exactly.

Listed on

Listed on JustMacAppsMotionShine on Mac App IndexMotionShine on ScrollLaunchMotionShine featured on StartupBaseFeatured on FazierFeatured on Twelve ToolsMotionShine - Featured on Smol Launch