Sine, Cosine, and Tangent Calculator
The Sine, Cosine, and Tangent Calculator computes the three fundamental trigonometric ratios for any angle you provide, in either degrees or radians. Given angle θ, it returns sin(θ), cos(θ), and tan(θ) using the unit-circle definitions: sin(θ) = opposite/hypotenuse, cos(θ) = adjacent/hypotenuse, and tan(θ) = opposite/adjacent = sin(θ)/cos(θ). These functions are indispensable in geometry, physics, engineering, navigation, and architecture — any time you need to relate an angle to side lengths or decompose a vector into components. Unlike a pocket scientific calculator, this tool gives you all three values at once without switching RAD/DEG modes. Select your unit, enter the angle, and get sin, cos, and tan in a single step. Exact fractional values and a full reference table are included below.
To find sine, cosine, and tangent of angle θ: sin(θ) = opposite/hypotenuse; cos(θ) = adjacent/hypotenuse; tan(θ) = sin(θ)/cos(θ). Key exact values: sin(30°)=0.5, sin(45°)≈0.7071, sin(60°)≈0.8660; cos(30°)≈0.8660, cos(60°)=0.5; tan(45°)=1. Fundamental identity: sin²(θ)+cos²(θ)=1 for every angle.
When to use this calculator
- Finding the height of a building or tree by measuring the angle of elevation from a known distance (e.g., tan(35°) × 50 m = 35.01 m tall).
- Resolving a force vector into horizontal and vertical components in physics: Fx = F·cos(θ), Fy = F·sin(θ).
- Calculating roof pitch and rafter length in construction: a 4:12 pitch equals arctan(4/12) ≈ 18.43°, and the rafter length = run / cos(18.43°).
- Programming 2D/3D graphics rotations and circular motion, where object positions use x = r·cos(θ) and y = r·sin(θ).
- Navigation and surveying: computing bearing components and triangulating distances using the Law of Sines (a/sin A = b/sin B = c/sin C).
- Electrical engineering: AC voltage and current phase relationships, where V(t) = Vpeak · sin(ωt + φ).
Example: sin(45°), cos(45°), tan(45°)
- Angle: 45°, Unit: Degrees
- sin(45°) = √2/2 ≈ 0.7071
- cos(45°) = √2/2 ≈ 0.7071
- tan(45°) = sin/cos = 1.0000
How it works
3 min readHow It's Calculated
The three trigonometric functions are defined on the unit circle (radius = 1) centered at the origin. For an angle θ measured counterclockwise from the positive x-axis:
sin(θ) = y-coordinate of point on unit circle
cos(θ) = x-coordinate of point on unit circle
tan(θ) = sin(θ) / cos(θ) [undefined when cos(θ) = 0, i.e., θ = 90°, 270°, ...]Degree ↔ Radian conversion (required before applying formulas):
radians = degrees × (π / 180)
degrees = radians × (180 / π)Example: 30° → 30 × π/180 = π/6 ≈ 0.5236 rad
Right-triangle definitions (for 0° < θ < 90°):
sin(θ) = opposite / hypotenuse
cos(θ) = adjacent / hypotenuse
tan(θ) = opposite / adjacentKey Pythagorean and ratio identities:
sin²(θ) + cos²(θ) = 1
tan(θ) = sin(θ) / cos(θ)
1 + tan²(θ) = sec²(θ)---
Reference Table — Exact Values of sin, cos, tan
| Angle (°) | Radians | sin(θ) | cos(θ) | tan(θ) |
|---|---|---|---|---|
| 0° | 0 | 0 | 1 | 0 |
| 30° | π/6 ≈ 0.5236 | 1/2 = 0.5000 | √3/2 ≈ 0.8660 | 1/√3 ≈ 0.5774 |
| 45° | π/4 ≈ 0.7854 | √2/2 ≈ 0.7071 | √2/2 ≈ 0.7071 | 1.0000 |
| 60° | π/3 ≈ 1.0472 | √3/2 ≈ 0.8660 | 1/2 = 0.5000 | √3 ≈ 1.7321 |
| 90° | π/2 ≈ 1.5708 | 1 | 0 | undefined |
| 120° | 2π/3 ≈ 2.094 | √3/2 ≈ 0.8660 | −1/2 = −0.5000 | −√3 ≈ −1.7321 |
| 135° | 3π/4 ≈ 2.356 | √2/2 ≈ 0.7071 | −√2/2 ≈ −0.7071 | −1 |
| 150° | 5π/6 ≈ 2.618 | 1/2 = 0.5000 | −√3/2 ≈ −0.8660 | −1/√3 ≈ −0.5774 |
| 180° | π ≈ 3.1416 | 0 | −1 | 0 |
| 270° | 3π/2 ≈ 4.712 | −1 | 0 | undefined |
| 360° | 2π ≈ 6.283 | 0 | 1 | 0 |
> Exact fractions: sin(30°)=1/2; sin(45°)=√2/2; sin(60°)=√3/2. Cosine mirrors sine: cos(30°)=√3/2; cos(45°)=√2/2; cos(60°)=1/2.
---
Typical Examples
Example 1 — Angle of Elevation (Height of a Flagpole)
You stand 20 m from a flagpole and measure the angle of elevation to its top as 55°.
height = distance × tan(55°)
height = 20 × 1.4281 ≈ 28.56 mExample 2 — Vector Component Decomposition
A soccer ball is kicked at 40° above horizontal with an initial speed of 25 m/s.
Horizontal component: vx = 25 × cos(40°) = 25 × 0.7660 ≈ 19.15 m/s
Vertical component: vy = 25 × sin(40°) = 25 × 0.6428 ≈ 16.07 m/sExample 3 — Roof Rafter Length
A roof has a horizontal run of 12 ft and a pitch angle of 25°.
Rafter length = run / cos(25°) = 12 / 0.9063 ≈ 13.24 ft
Vertical rise = run × tan(25°) = 12 × 0.4663 ≈ 5.60 ft---
Common Mistakes
1. Using degrees when the formula expects radians — Most programming languages (Python, JavaScript, C++) and many formulas use radians by default. sin(30) in code means sin(30 radians) ≈ −0.988, not sin(30°) = 0.5. Always convert first.
2. Expecting tan(90°) to return a number — tan(90°) is mathematically undefined (division by zero, since cos(90°) = 0). Calculators may display a very large number or an error; neither is "the answer."
3. Ignoring the quadrant when interpreting inverse trig results — arcsin(0.5) = 30°, but 150° also has sin = 0.5. If your context is in the second quadrant (e.g., obtuse triangle), you must add: θ = 180° − 30° = 150°.
4. Confusing sin²(θ) notation — sin²(θ) means [sin(θ)]², NOT sin(θ²). Writing sin²(30°) = [0.5]² = 0.25, not sin(900°).
5. Rounding intermediate steps — Rounding sin(θ) and cos(θ) before computing tan(θ) = sin/cos amplifies error. Always carry full precision through intermediate calculations and round only the final result.
---
Related Calculators
Frequently asked questions
What is the exact value of sin(30°), cos(30°), and tan(30°)?
These are among the most memorized exact values: sin(30°) = 1/2 = 0.5 exactly, cos(30°) = √3/2 ≈ 0.8660, and tan(30°) = 1/√3 = √3/3 ≈ 0.5774. They derive from the geometry of an equilateral triangle split in half, creating a 30-60-90 right triangle with sides in ratio 1 : √3 : 2.
What is the exact value of sin(45°) and cos(45°)?
sin(45°) = cos(45°) = √2/2 ≈ 0.7071, and tan(45°) = 1 exactly. These derive from a 45-45-90 isosceles right triangle with legs of length 1 and hypotenuse √2. This is also why a 45° angle gives equal horizontal and vertical components when decomposing a vector.
Why is tan(90°) undefined?
Because tan(θ) = sin(θ)/cos(θ), and cos(90°) = 0. Division by zero is undefined in mathematics. On the unit circle, the tangent represents the slope of the terminal ray; at exactly 90°, that ray is vertical — a slope that has no finite value. Calculators may show a very large number due to floating-point limits, but mathematically there is no answer.
How do I convert an angle from degrees to radians before using these formulas?
Multiply degrees by π/180 (approximately 0.017453). For example: 45° × (π/180) = π/4 ≈ 0.7854 radians. To go back, multiply radians by 180/π ≈ 57.2958. This conversion is critical because virtually all scientific computing libraries (Python's math module, JavaScript's Math object) treat angle inputs as radians, not degrees.
What are the signs of sin, cos, and tan in each quadrant?
Use the mnemonic ASTC ('All Students Take Calculus'): Quadrant I (0°–90°) — All three positive. Quadrant II (90°–180°) — only Sine positive. Quadrant III (180°–270°) — only Tangent positive. Quadrant IV (270°–360°) — only Cosine positive. This is essential when solving equations like sin(θ) = 0.5, which has solutions in both Q1 (30°) and Q2 (150°).
What is the range of values that sine, cosine, and tangent can take?
Sine and cosine are bounded: both range from −1 to +1 inclusive (since they represent coordinates on a unit circle). Tangent is unbounded: it ranges from −∞ to +∞, with vertical asymptotes at θ = 90° + 180°·n for any integer n. This means tan can equal 1,000 or −5,000, while sin and cos never exceed ±1.
How are these trig functions used in real-world engineering and physics?
Engineers use sin and cos constantly to decompose forces, velocities, and electric fields into perpendicular components. For instance, a 500 N force applied at 30° to the horizontal splits into Fx = 500·cos(30°) ≈ 433 N and Fy = 500·sin(30°) = 250 N. In AC circuits, voltage is modeled as V(t) = Vpeak·sin(2πft + φ), where f is frequency in hertz.
Are sine and cosine the same function just shifted?
Yes — cosine is a phase-shifted version of sine: cos(θ) = sin(θ + 90°), or equivalently sin(θ) = cos(90° − θ). This complementary relationship is the origin of the prefix 'co-' in cosine (complement's sine). The two functions have identical shape and amplitude; cosine simply leads sine by 90° (π/2 radians) on any graph.
How does the Pythagorean identity sin²(θ) + cos²(θ) = 1 work, and how can I use it?
It follows directly from the Pythagorean theorem applied to the unit circle: for any point (cos θ, sin θ) on the circle of radius 1, x² + y² = 1. Practically, it lets you find one ratio given the other — if sin(θ) = 0.6, then cos(θ) = ±√(1 − 0.36) = ±0.8 (sign determined by quadrant). It also spawns identities like 1 + tan²(θ) = sec²(θ) and 1 + cot²(θ) = csc²(θ).
What is the period of sine, cosine, and tangent?
Sine and cosine both have a period of 360° (2π radians): sin(θ + 360°) = sin(θ) and cos(θ + 360°) = cos(θ). Tangent has a shorter period of 180° (π radians): tan(θ + 180°) = tan(θ). This means if you know the value at one angle, you immediately know it at every angle ±360° (or ±180° for tangent) away from it.
What is the small-angle approximation and when is it valid?
For small angles in radians, sin(θ) ≈ θ and cos(θ) ≈ 1. The error in sin(θ) ≈ θ is less than 1% for angles under 14° (0.244 rad) and under 0.1% for angles under 4.4° (0.077 rad). This approximation underlies paraxial optics and the simple pendulum formula T = 2π√(L/g), which is only exact for very small oscillations. Beyond about 15°, you must use the full trigonometric values.