The Standard Engine.
MathematicsFinanceHealthPhysicsEngineeringBrowse all

Mathematics · Geometry & Trigonometry · Trigonometry

Sin Cos Tan Calculator

Calculates the sine, cosine, and tangent of any angle entered in degrees or radians, along with their reciprocal functions cosecant, secant, and cotangent.

Calculator

Advertisement

Formula

θ (theta) is the angle of interest. In a right triangle, 'opposite' is the side opposite to θ, 'adjacent' is the side next to θ (not the hypotenuse), and 'hypotenuse' is the longest side. sin(θ) gives the ratio of opposite to hypotenuse; cos(θ) gives adjacent to hypotenuse; tan(θ) gives opposite to adjacent. The reciprocals are: cosecant csc(θ) = 1/sin(θ), secant sec(θ) = 1/cos(θ), and cotangent cot(θ) = 1/tan(θ).

Source: Abramowitz, M. & Stegun, I. A. (1964). Handbook of Mathematical Functions. National Bureau of Standards, Chapter 4.

How it works

Trigonometric functions describe the relationships between angles and side ratios in a right triangle, but their definition extends well beyond triangles via the unit circle. On a unit circle (radius = 1), an angle θ measured from the positive x-axis determines a point (x, y). At that point, cos(θ) = x and sin(θ) = y. This definition makes trig functions valid for any angle — positive, negative, or greater than 360° — which is essential for analysing periodic phenomena such as sound waves, electrical signals, and planetary motion.

The three primary functions are: sin(θ) = opposite / hypotenuse, cos(θ) = adjacent / hypotenuse, and tan(θ) = opposite / adjacent = sin(θ) / cos(θ). Their reciprocals are cosecant csc(θ) = 1/sin(θ), secant sec(θ) = 1/cos(θ), and cotangent cot(θ) = cos(θ)/sin(θ). All six values together fully characterise the angle's geometric and rotational properties. Note that tan(θ) and sec(θ) are undefined when cos(θ) = 0 (i.e., at 90°, 270°, …), and csc(θ) and cot(θ) are undefined when sin(θ) = 0 (i.e., at 0°, 180°, …).

To use this calculator, enter your angle and select the unit — degrees for everyday geometry and navigation, radians for calculus, physics, and programming. The calculator converts degrees to radians internally using the relation θ_rad = θ_deg × π/180 before applying JavaScript's built-in Math functions, which operate exclusively in radians. Results are displayed to six decimal places for engineering-grade precision. Common reference values to verify results: sin(30°) = 0.5, cos(60°) = 0.5, tan(45°) = 1, sin(90°) = 1.

Worked example

Example 1 — Degrees: Find all six trig values for θ = 30°.

Step 1: Convert to radians — 30 × π/180 = π/6 ≈ 0.523599 rad

Step 2: sin(30°) = 0.500000 (opposite/hypotenuse in a 30-60-90 triangle is 1/2)

Step 3: cos(30°) = 0.866025 (√3/2 ≈ 0.866025)

Step 4: tan(30°) = sin/cos = 0.5 / 0.866025 = 0.577350 (= 1/√3)

Step 5: csc(30°) = 1/0.5 = 2.000000

Step 6: sec(30°) = 1/0.866025 = 1.154701 (= 2/√3)

Step 7: cot(30°) = 1/tan(30°) = 1.732051 (= √3)

Example 2 — Radians: Find sin, cos, and tan for θ = π/4 rad (= 45°).

sin(π/4) = 0.707107 (= √2/2), cos(π/4) = 0.707107, tan(π/4) = 1.000000. This confirms the well-known 45° identity where sin = cos and tan = 1.

Limitations & notes

This calculator uses double-precision floating-point arithmetic (IEEE 754), which introduces tiny rounding errors for angles that are multiples of common reference values. For example, tan(90°) theoretically approaches infinity, but due to floating-point representation of π, the result may be an extremely large number rather than undefined — the calculator handles this by checking if cos(θ) is within 1×10⁻¹⁰ of zero and returning an undefined result. Similarly, sin(180°) may display as approximately −2.45×10⁻¹⁶ rather than exactly 0. For symbolic exact values (e.g., √2/2, √3/2), use a computer algebra system such as Wolfram Alpha. This calculator is designed for numerical approximation, not symbolic computation. It does not solve inverse trig problems (finding the angle from a ratio) — for that, use an arcsin, arccos, or arctan calculator separately.

Frequently asked questions

What is the difference between using degrees and radians in trig calculations?

Degrees divide a full rotation into 360 equal parts and are standard in geometry, navigation, and everyday measurement. Radians define angle by arc length on a unit circle — one full rotation equals 2π radians (≈ 6.2832). Radians are the natural unit in calculus and physics because they simplify derivatives: d/dx[sin(x)] = cos(x) holds only when x is in radians. Most programming languages and scientific calculators work internally in radians, which is why this tool converts degrees before computing.

Why is tan(90°) undefined?

Tangent is defined as sin(θ)/cos(θ). At exactly 90°, cos(90°) = 0, making the division undefined (division by zero). Geometrically, the tangent line to the unit circle at 90° is vertical — it never intersects the x-axis, representing an infinitely steep slope. The same undefined condition applies at 270°, 450°, and any angle of the form 90° + 180°n where n is an integer.

What are the exact values of sin, cos, and tan for the most common angles?

Key exact values: sin(0°)=0, cos(0°)=1, tan(0°)=0; sin(30°)=1/2, cos(30°)=√3/2, tan(30°)=1/√3; sin(45°)=√2/2, cos(45°)=√2/2, tan(45°)=1; sin(60°)=√3/2, cos(60°)=1/2, tan(60°)=√3; sin(90°)=1, cos(90°)=0, tan(90°)=undefined. These values arise from the geometry of equilateral and isosceles right triangles and are essential to memorise for exams and engineering work.

How do trigonometric functions relate to the unit circle?

The unit circle has radius 1 and is centred at the origin. For any angle θ measured counter-clockwise from the positive x-axis, the coordinates of the point on the circle are (cos θ, sin θ). This extends trig functions beyond 0°–90° to all real numbers, enabling analysis of periodic motion. For instance, a point completing one full revolution returns to its starting position, which is why sin and cos have a period of 360° (or 2π radians), while tan has a period of 180° (or π radians).

What is the Pythagorean identity and how can I verify my results with it?

The fundamental Pythagorean identity states sin²(θ) + cos²(θ) = 1 for every angle θ. You can verify any pair of sin and cos values from this calculator by squaring both results and summing them — the total should equal 1 (within floating-point precision, e.g., 0.999999 to 1.000001). Two related identities are: 1 + tan²(θ) = sec²(θ) and 1 + cot²(θ) = csc²(θ). These identities are widely used to simplify expressions in calculus and proofs.

Last updated: 2025-01-15 · Formula verified against primary sources.