Skip to content
Calculator Collection

Cosine Calculator

Calculates the cosine of an angle entered in degrees, returning a value between −1 and 1. Use it when resolving horizontal force components, applying the Law of Cosines, computing dot products, or working with periodic functions.

Last updated: May 2026

Fill in the required fields to see your result.

Compare with similar

About this calculator

The cosine function is a fundamental trigonometric ratio. In a right triangle, cos(θ) equals the length of the side adjacent to the angle divided by the hypotenuse: cos(θ) = adjacent / hypotenuse. The unit-circle definition extends this to all real angles: cos(θ) is the x-coordinate of the point on the unit circle (radius 1) at angle θ measured counter-clockwise from the positive x-axis. Because computers work in radians natively, the degree input is first converted using radians = degrees × π / 180. Variables: angle (in degrees, any real number). Like sine, cosine output is bounded between −1 and +1. Key reference values: cos(0°) = 1, cos(30°) = √3/2 ≈ 0.8660, cos(45°) = √2/2 ≈ 0.7071, cos(60°) = 0.5, cos(90°) = 0, cos(180°) = −1, cos(270°) = 0, cos(360°) = 1. The function is periodic with period 360° and even, meaning cos(−θ) = cos(θ). Cosine equals sine shifted by 90°: cos(θ) = sin(90° − θ), making the two functions phase-shifted versions of each other. Cosine is essential in the Law of Cosines for solving oblique triangles (c² = a² + b² − 2ab·cos(C)), in vector dot products (A·B = |A||B|·cos(θ)), in describing horizontal components of angled forces or velocities, and in Fourier analysis of waveforms. Edge cases: floating-point errors at exact angles where cosine should be zero (90°, 270°) may produce values like 6.12e−17; round near-zero results to exactly zero in conditional checks.

How to use

Example 1: Find cos(60°). Step 1: convert to radians — 60 × π/180 ≈ 1.0472 radians. Step 2: compute cos(1.0472) = 0.5 exactly. Verify: in a classic 30-60-90 right triangle with hypotenuse 2 and legs 1 and √3, the side adjacent to 60° is the short leg (length 1), giving adjacent/hypotenuse = 1/2 = 0.5 — matches. Example 2: Resolve a 100 N force pulling at 30° above horizontal into its horizontal component. Step 1: horizontal = force × cos(angle) = 100 × cos(30°). Step 2: cos(30°) = √3/2 ≈ 0.8660. Step 3: horizontal = 100 × 0.8660 ≈ 86.6 N. Verify: this should be larger than the vertical component (50 N from sin(30°) × 100), since the force is closer to horizontal than vertical — confirmed.

Frequently asked questions

What does the cosine of an angle represent geometrically?

Geometrically, cosine represents the ratio of the adjacent side to the hypotenuse in a right triangle. On the unit circle, cos(θ) is the x-coordinate of the point on the circle at angle θ from the positive x-axis. This makes cosine a measure of horizontal projection — when an object moves or a force acts at an angle, the cosine of that angle gives the fraction of the motion or force acting in the horizontal direction. In vector mathematics, cosine appears in the dot product formula A·B = |A||B|·cos(θ), where θ is the angle between vectors A and B. Cosine also forms the basis of Fourier analysis, where any periodic signal can be decomposed into a sum of sines and cosines of different frequencies.

How is cosine different from sine and when should I use it?

While sine relates to the side opposite an angle (sin = opp/hyp), cosine relates to the side adjacent to it (cos = adj/hyp). Use cosine when you know an angle and the hypotenuse and need the adjacent side, or when decomposing a vector into its horizontal component. For example, a 100 N force at 30° above horizontal has horizontal component 100 × cos(30°) ≈ 86.6 N. Sine would give the vertical component (50 N). In practice, choose cosine for horizontal or along-the-axis components and sine for perpendicular or cross-axis components. Cosine also dominates the Law of Cosines (used for oblique triangles), the dot product, and any rotation transformation matrix in computer graphics.

Why does cosine equal 1 at 0 degrees and 0 at 90 degrees?

At 0°, the angle points directly along the adjacent side, meaning the adjacent side equals the hypotenuse, giving a ratio of 1. As the angle increases toward 90°, the adjacent side shrinks relative to the hypotenuse until it reaches zero length at exactly 90°, making the ratio 0. On the unit circle, this corresponds to the x-coordinate moving from 1 (angle 0°, pointing right) to 0 (angle 90°, pointing straight up). Past 90°, the x-coordinate becomes negative as the point moves into the second quadrant, so cosine values turn negative through to 180°. This periodic, smooth behavior makes cosine a natural model for horizontal oscillations and wave phenomena that start at maximum displacement.

What are common mistakes when computing cosine values?

Forgetting degree mode and computing cos(60) as 60 radians instead of 60 degrees gives ≈ −0.952 instead of 0.5 — a wildly wrong answer. Confusing the inverse cosine (arccos or cos⁻¹) with the reciprocal (1/cos = secant) is a common notation error. Using cosine for the perpendicular component when sine is needed (or vice versa) flips the result entirely. Floating-point noise near exact zero values (cos(90°) = 6.12e−17 instead of 0) trips up equality checks — round small results. For angles outside the standard 0–360° range, the periodicity and even symmetry (cos(−θ) = cos(θ)) must be applied carefully. Don't forget that cos² + sin² = 1 — a Pythagorean identity used to derive one trig value from the other when only one is known.

When should I NOT use a basic cosine calculator?

Oblique (non-right) triangles need the Law of Cosines (c² = a² + b² − 2ab·cos(C)) or Law of Sines rather than a basic cosine lookup. Hyperbolic cosine (cosh) is a different function used in catenary curves (suspension bridges, hanging cables) and special relativity — don't confuse the two. Spherical trigonometry on a sphere's surface uses different formulas. Finding an angle from a cosine value requires the inverse function (arccos), not the regular cosine. For complex-number angles, matrix-valued arguments, or quaternion rotations in 3D graphics, use specialized libraries. Wave functions with non-unit amplitude or non-zero phase (A·cos(ωt + φ)) need the full waveform formula, not just a basic cosine value. Finally, for time-varying signals where the angle changes continuously, you typically need a numerical or symbolic solver rather than a one-shot value calculator.

Sources & references