Tangent Calculator
Easily calculate the tangent of an angle given in degrees or radians using our tangent calculator. Enter the angle and select the unit.
Common Tangent Values
| Angle (Degrees) | Angle (Radians) | Tangent (tan) |
|---|---|---|
| 0° | 0 | 0 |
| 30° | π/6 (≈0.5236) | 1/√3 (≈0.5774) |
| 45° | π/4 (≈0.7854) | 1 |
| 60° | π/3 (≈1.0472) | √3 (≈1.7321) |
| 90° | π/2 (≈1.5708) | Undefined (±∞) |
| 120° | 2π/3 (≈2.0944) | -√3 (≈-1.7321) |
| 135° | 3π/4 (≈2.3562) | -1 |
| 150° | 5π/6 (≈2.6180) | -1/√3 (≈-0.5774) |
| 180° | π (≈3.1416) | 0 |
Table of common angles and their tangent values.
Trigonometric Functions Graph
Graph of Sine (blue), Cosine (green), and Tangent (red) from -π to π radians.
What is a Tangent Calculator?
A tangent calculator is a tool used to determine the tangent of a given angle. The tangent is one of the primary trigonometric functions, alongside sine and cosine. It's defined, in the context of a right-angled triangle, as the ratio of the length of the side opposite the angle to the length of the side adjacent to the angle. Our tangent calculator allows you to input an angle in either degrees or radians and instantly get the tangent value.
This calculator is useful for students studying trigonometry, engineers, architects, and anyone working with angles and their trigonometric relationships. It simplifies the process of finding the tangent, especially for angles that aren't common values like 30°, 45°, or 60°.
Common misconceptions include thinking the tangent is always between -1 and 1 (like sine and cosine), but the tangent function can take any real value, approaching positive or negative infinity at certain angles (like 90° or 270°).
Tangent Calculator Formula and Mathematical Explanation
The tangent of an angle θ (tan(θ)) is mathematically defined as:
tan(θ) = sin(θ) / cos(θ)
In a right-angled triangle, if we consider one of the acute angles θ:
tan(θ) = Opposite Side / Adjacent Side
Our tangent calculator uses the built-in `Math.tan()` function in JavaScript. This function requires the angle to be provided in radians. If you input the angle in degrees, the calculator first converts it to radians using the formula:
Radians = Degrees * (π / 180)
Once the angle is in radians, `Math.tan(radians)` is computed.
| Variable | Meaning | Unit | Typical Range |
|---|---|---|---|
| θ (angle) | The input angle | Degrees or Radians | Any real number (though often 0-360° or 0-2π rad) |
| tan(θ) | Tangent of the angle | Dimensionless | -∞ to +∞ |
| π (Pi) | Mathematical constant | N/A | ≈3.14159 |
Variables involved in tangent calculation.
The tangent function has a period of π radians (or 180°), meaning tan(θ) = tan(θ + π). It becomes undefined (approaches infinity) at angles where the cosine is zero, such as π/2 (90°), 3π/2 (270°), etc.
Practical Examples (Real-World Use Cases)
Example 1: Finding the Height of a Building
Suppose you are standing 50 meters away from the base of a building and you measure the angle of elevation to the top of the building as 60 degrees. You can use the tangent to find the height (opposite side) of the building.
tan(60°) = Height / 50 meters
Height = 50 * tan(60°)
Using a tangent calculator or knowing tan(60°) ≈ 1.732, Height ≈ 50 * 1.732 = 86.6 meters.
Example 2: Navigation
A ship is sailing and its bearing relative to a lighthouse changes. If the ship is at a certain distance from the lighthouse and moves perpendicular to the initial line of sight, the change in angle and tangent can be used to calculate distances or positions. For instance, if a ship is 10 km east of a lighthouse and sails north, the angle from the lighthouse to the ship changes, and the tangent of this angle relates the northward distance to the eastward distance (10 km).
How to Use This Tangent Calculator
- Enter the Angle Value: Type the numerical value of the angle into the "Angle Value" input field.
- Select the Unit: Choose whether the angle you entered is in "Degrees (°)" or "Radians (rad)" from the dropdown menu.
- Calculate: The calculator automatically updates the results as you type or change the unit. You can also click the "Calculate" button.
- View Results: The primary result shows the tangent value. Intermediate results display the angle in both degrees and radians.
- Reset: Click "Reset" to return the inputs to their default values (45 degrees).
- Copy Results: Click "Copy Results" to copy the main tangent value and the angle in both units to your clipboard.
The displayed tangent value can be used in further calculations or to understand the slope or ratio related to the angle. Remember that the tangent is undefined at 90°, 270°, etc., and the calculator might show a very large number or "Infinity" for angles very close to these values.
Key Factors That Affect Tangent Results
- Angle Value: The primary determinant. The tangent function is highly sensitive to the angle's value.
- Angle Unit: Whether the angle is in degrees or radians is crucial. The formula `Math.tan()` expects radians, so conversion is necessary if degrees are used. Our tangent calculator handles this.
- Precision of π: The accuracy of the value of π used in the degrees-to-radians conversion affects the precision of the result, though `Math.PI` is generally sufficient.
- Proximity to Asymptotes: Angles near 90° (π/2), 270° (3π/2), etc., will result in very large positive or negative tangent values, approaching infinity. Computational limits might show "Infinity" or a very large number.
- Calculator Precision: The internal precision of the JavaScript `Math` object can influence the number of decimal places in the result.
- Input Accuracy: The accuracy of the angle you input directly affects the output of the tangent calculator.
Frequently Asked Questions (FAQ)
A: The tangent of 90 degrees (π/2 radians) is undefined because cos(90°) = 0, and tan(90°) = sin(90°)/cos(90°) = 1/0. The function approaches positive or negative infinity as the angle approaches 90°. Our tangent calculator might display "Infinity" or a very large number.
A: Yes, the tangent is negative for angles in the second and fourth quadrants (e.g., between 90° and 180°, and between 270° and 360°).
A: The range of the tangent function is all real numbers, from negative infinity (-∞) to positive infinity (+∞).
A: Multiply the angle in degrees by π/180. The tangent calculator does this automatically if you select degrees.
A: The tangent function has a period of π radians or 180 degrees, meaning tan(θ) = tan(θ + 180°) or tan(θ) = tan(θ + π).
A: Yes, the tangent function is an odd function, so tan(-x) = -tan(x).
A: Yes, the tangent function is periodic, so tan(θ) = tan(θ + 360°n) where n is an integer. The calculator will give the correct value.
A: Arctangent is the inverse tangent function. If y = tan(x), then x = arctan(y). It gives you the angle whose tangent is y. This tangent calculator finds tan(x), not arctan(y).
Related Tools and Internal Resources
- Sine Calculator: Find the sine of an angle.
- Cosine Calculator: Calculate the cosine of an angle.
- Trigonometry Basics: Learn the fundamentals of trigonometric functions.
- Angle Converter: Convert between degrees, radians, and other units.
- Right Triangle Calculator: Solve right triangles given sides or angles.
- Unit Circle Explorer: Visualize sine, cosine, and tangent on the unit circle.