Free Tangent Calculator

ytan(x)

Enter an angle, then click Calculate

For anyone working with angles and triangles, the tangent function is a fundamental tool in trigonometry. This tangent calculator provides an easy way to calculate the tangent of any angle, whether expressed in degrees or radians. Simply enter your angle, and the tan function result appears immediately, streamlining calculations for students, engineers, and hobbyists alike.

Definitions of Tangent

The tangent of an angle has multiple interpretations. In the context of a right triangle, tangent is defined as the ratio of the side opposite the angle to the side adjacent to it (the "opposite over adjacent" rule). Algebraically:

tan⁡(α)=oppositeadjacent\tan(\alpha) = \dfrac{\text{opposite}}{\text{adjacent}}

In addition to the triangle definition, tangent can be understood through the unit circle. Picture a unit circle centered at the origin. Draw the radius at angle α\alpha from the positive x-axis. Let C be the point where this radial line meets the vertical line x=1x = 1. Then the y‑coordinate of C equals tan⁡(α)\tan(\alpha). This unit‑circle perspective links directly to the coordinate geometry of trigonometry.

The term "tangent" also appears in geometry to describe a line that just touches a curve at one point without crossing it. The word traces back to the Latin tangere ("to touch"), which inspired both the geometric and trigonometric meanings.

Tangent as the Ratio of Sine to Cosine

One of the handiest relationships in trigonometry is the identity that expresses tangent in terms of sine and cosine:

tan⁡(α)=sin⁡(α)cos⁡(α)\tan(\alpha) = \dfrac{\sin(\alpha)}{\cos(\alpha)}

Why does this hold? From the unit‑circle coordinate interpretation, we have sin⁡(α)=y\sin(\alpha) = y and cos⁡(α)=x\cos(\alpha) = x (where (x,y)(x, y) are the coordinates of the point on the unit circle). The triangle‑based definition gave tan⁡(α)=oppositeadjacent=yx\tan(\alpha) = \dfrac{\text{opposite}}{\text{adjacent}} = \dfrac{y}{x}. Substituting the sine and cosine yields the formula above. This identity is the source of a number of math‑humor "sin over cos" memes — a playful reminder of the simple relationship.

Law of Tangents

For any triangle, the law of tangents relates the lengths of two sides to the tangents of the opposite angles. Given a triangle with sides aa and bb opposite angles α\alpha and β\beta respectively, the law reads:

a−ba+b=tan⁡(α−β2)tan⁡(α+β2)\frac{a - b}{a + b} = \frac{\tan\left(\dfrac{\alpha - \beta}{2}\right)}{\tan\left(\dfrac{\alpha + \beta}{2}\right)}

Although less commonly used than the law of sines or law of cosines, the law of tangents can be particularly helpful when you know two sides and their included angle, or two angles and any side. It provides an alternative path to solving triangles without resorting to the more popular theorems.

Using the Tangent Calculator

The operation of this trigonometry calculator is straightforward. You supply an angle value; the tool automatically detects whether it is in degrees or radians (you can switch the unit from a dropdown menu). Once the input is accepted, the tan function calculator displays the result. The calculator handles both positive and negative angles, and it correctly identifies angles where the tangent is undefined (i.e., whenever cos⁡(α)=0\cos(\alpha) = 0, such as 90∘90^{\circ} or π/2\pi/2 rad, because division by zero is not allowed). An indication of "undefined" or "∞\infty" may be shown in those cases.

For quick reference, the table below lists the tangent of some frequently encountered angles:

Angle (Deg)Angle (Rad)tan⁡(α)\tan(\alpha)
0∘0^{\circ}0000
30∘30^{\circ}π/6\pi/63/3≈0.57735\sqrt{3}/3 \approx 0.57735
45∘45^{\circ}π/4\pi/411
60∘60^{\circ}π/3\pi/33≈1.73205\sqrt{3} \approx 1.73205
90∘90^{\circ}π/2\pi/2Undefined
180∘180^{\circ}π\pi00

With this tool, calculating tangent becomes a matter of a single click, freeing you from manual computation or looking up tables.

FAQ

1. How do I use the Tangent Calculator?

Enter the angle in degrees or radians using the input field. You can change the unit by clicking the unit label and selecting from the dropdown. The corresponding tangent value will appear instantly.

2. What is the tangent formula?

In a right triangle, tangent of an angle is the ratio of the opposite side to the adjacent side: \(\tan(\alpha)=\frac{\text{opposite}}{\text{adjacent}}\). It can also be expressed as sine divided by cosine: \(\tan(\alpha)=\frac{\sin(\alpha)}{\cos(\alpha)}\).

3. Why is the tangent of 90° undefined?

The tangent is undefined when \(\cos(\alpha)=0\) because division by zero is not possible. At 90° (\(\pi/2\) rad), cosine equals 0, so the tangent is undefined.

4. What is the law of tangents?

The law of tangents relates two sides and the tangents of the opposite angles in a triangle: \(\frac{a-b}{a+b} = \frac{\tan(\frac{\alpha-\beta}{2})}{\tan(\frac{\alpha+\beta}{2})}\). It is useful when you know two sides and the included angle, or two angles and a side.

5. How is tan related to sin and cos?

Tangent equals sine divided by cosine: \(\tan(\alpha)=\frac{\sin(\alpha)}{\cos(\alpha)}\). This follows from the unit circle definitions where \(\sin(\alpha)=y\), \(\cos(\alpha)=x\), and \(\tan(\alpha)=y/x\).

How to Use

  1. Enter the angle value in the input field. You can use decimal numbers (e.g., 45, 0.785, or 0.25 for π radians).
  2. Select the angle unit from the dropdown menu. Choose from degrees, radians, milliradians, or π radians.
  3. Click the Calculate button to get the tangent of your angle. The result shows tan(α) along with the equivalent angle in radians.