How the Trig Calculator Works
Trigonometric functions describe the relationship between an angle and the coordinates of a point on the unit circle — a circle of radius 1 centered at the origin. If you rotate a ray from the positive x-axis by an angle θ, it meets the circle at a point (x, y). By definition, cos θ = x, sin θ = y, and tan θ = y/x = sin θ / cos θ. In a right triangle, these same ratios equal adjacent/hypotenuse, opposite/hypotenuse, and opposite/adjacent for one of the acute angles.
How the calculation works
Enter an angle and choose whether it is measured in degrees or radians. If you enter degrees, the calculator first converts to radians using rad = deg × π/180 (since JavaScript's trig functions expect radians), computes sin(θ) and cos(θ) directly, then divides to get tan(θ) = sin(θ)/cos(θ). It also reports the same angle converted into the other unit, using rad × 180/π to go from radians to degrees.
Common mistakes
- Wrong angle mode: entering 45 while the calculator is set to radians treats it as 45 radians (about 2,578°), not 45°. Always match the unit selector to your input.
- Assuming tangent is always defined: tan θ is undefined at 90°, 270°, and any angle of the form 90° + 180°n, because cos θ = 0 there and division by zero is undefined.
- Forgetting the sign by quadrant: sine and cosine are positive or negative depending on which quadrant the angle falls in (for example, both are negative for angles between 180° and 270°), so a negative result is often correct, not an error.
Checking your result
A few quick sanity checks: sin(0°) = 0, cos(0°) = 1, and sin(90°) = 1, cos(90°) = 0. sin θ and cos θ should always land between -1 and 1 — if your calculator shows a value outside that range, the angle mode is likely wrong. For small angles near 0°, tan θ ≈ sin θ, since cos θ is close to 1.
Applications
These ratios are the basis for solving right triangles (finding an unknown side or angle), computing heights and distances via angle of elevation or depression, resolving forces and velocities into components in physics and engineering, and generating the smooth periodic waves used in sound, signal processing, and simple harmonic motion.