Cosine Calculator

Enter an angle in degrees or radians to find its cosine, cos θ.

Updated

Angle unit
Enter to calculate Esc to clear

Cosine Calculator

Our Cosine Calculator finds cos θ for any angle in degrees or radians. Type the angle and the answer appears straight away to 10 decimal places, with the exact value for special angles (such as √3/2 for 30°), the angle in the other unit, the quadrant, and sin θ and tan θ. You can type multiples of π such as π/3, and special angles come out exact, so cos 90° is 0 rather than the 6.12 × 10⁻¹⁷ many programs show.

Quick answer

The cosine of an angle is the adjacent side divided by the hypotenuse in a right triangle, or the x-coordinate on the unit circle. For example, cos 60° = 1/2 = 0.5. Enter any angle above and the calculator shows cos θ instantly.

  • Formula: cos θ = adjacent ÷ hypotenuse
  • Key values: cos 0° = 1, cos 30° ≈ 0.8660, cos 45° ≈ 0.7071, cos 60° = 0.5, cos 90° = 0
  • Range: always between −1 and 1, repeating every 360° (2π)
  • Link to sine: cos θ = sin(90° − θ), so cos 60° = sin 30°

What Is Cosine?

Cosine is one of the three main trigonometric functions, with sine and tangent. In a right triangle it compares the side next to an angle (the adjacent side) with the longest side, the hypotenuse:

cos θ = adjacent ÷ hypotenuse

SOH: sin = opp / hyp
CAH: cos = adj / hyp
TOA: tan = opp / adj

The unit circle extends cosine to every angle: walk round a circle of radius 1 from the positive x-axis by the angle θ, and cos θ is how far right or left (the x-coordinate) of the centre you are. That is why cosine is positive on the right half of the circle, negative on the left half, and never larger than 1.

Cosine Table of Common Angles

AngleExactDecimal
0° (0)11
30° (π/6)√3/20.8660
45° (π/4)√2/20.7071
60° (π/3)1/20.5
90° (π/2)00
120° (2π/3)−1/2−0.5
135° (3π/4)−√2/2−0.7071
150° (5π/6)−√3/2−0.8660
180° (π)−1−1
270° (3π/2)00
360° (2π)11

The cosine column is the sine column read backwards: from 0° to 90° the cosines are √4/2, √3/2, √2/2, √1/2 and √0/2.

The Cosine Graph

Graph of y = cos(θ) from 0° to 360°: it starts at 1, falls to 0 at 90°, reaches −1 at 180°, returns to 0 at 270° and back to 1 at 360° 90° 180° 270° 360° −1 1 (0°, 1) (60°, 0.5) (180°, −1)
  • Period: the wave repeats every 360° (2π radians).
  • Amplitude: it swings between −1 and 1, starting at its top value cos 0° = 1.
  • Zeros: cos θ = 0 at 90°, 270° and every odd multiple of 90°.
  • Even function: cos(−θ) = cos θ, so the graph is a mirror image across the y-axis.
  • Shifted sine: the cosine wave is the sine wave moved 90° to the left.

Degrees and Radians

A full turn is 360 degrees or 2π radians. One radian is the angle where the arc length equals the radius, about 57.2958°.

radians = degrees × π ÷ 180
degrees = radians × 180 ÷ π

60° = π/3 ≈ 1.0472 rad
1 rad ≈ 57.2958°

Scientific calculators have a DEG/RAD mode, and programming languages always use radians. If an answer looks wrong, check the unit first.

Cosine Rules and Identities

  • Pythagorean: sin2θ + cos2θ = 1.
  • Negative angle: cos(−θ) = cos θ.
  • Supplement: cos(180° − θ) = −cos θ, so cos 120° = −cos 60° = −0.5.
  • Complement: cos(90° − θ) = sin θ.
  • Full turn: cos(θ + 360°) = cos θ.
  • Double angle: cos 2θ = cos2θ − sin2θ = 2cos2θ − 1.
  • Sum: cos(A + B) = cos A cos B − sin A sin B.
  • Law of cosines: c2 = a2 + b2 − 2ab cos C in any triangle.

Worked Examples

Horizontal length of a ramp. A 10 m ramp rises at 30°. The ground it covers is the side next to the angle:

run = 10 × cos 30°
= 10 × 0.8660 ≈ 8.66 m

Part of a force. A 50 N pull at 25° above the horizontal moves an object forward with 50 × cos 25° ≈ 50 × 0.9063 ≈ 45.3 N.

Law of cosines. Two sides of a triangle are 5 and 8 with a 60° angle between them. The third side is:

c² = a² + b² − 2ab cos C
= 5² + 8² − 80 × cos 60°
= 25 + 64 − 40
= 49, so c = 7

Radian inputs. cos(1) ≈ 0.5403, cos(2) ≈ −0.4161 and cos(2.5) ≈ −0.8011. Angles of 2 and 2.5 radians are about 115° and 143°, in quadrant II, so their cosines are negative.

Cosine in Excel and Code

Toolcos 60°
Excel / Google Sheets=COS(RADIANS(60))
Pythonmath.cos(math.radians(60))
JavaScriptMath.cos(60 * Math.PI / 180)
Scientific calculatorDEG mode, then cos 60

Excel’s COS and the code functions all expect radians, so =COS(60) gives −0.9524, the cosine of 60 radians. They also return 0.5000000000000001 for cos 60° and about 6.12 × 10−17 for cos 90°, because π cannot be stored exactly; round the result if you need clean numbers.

Common Mistakes

  • Wrong angle mode. cos 60 is 0.5 in degrees but about −0.9524 in radians.
  • Reading cos⁻¹ as 1/cos. cos−1(0.5) = 60° (arccos), while 1 ÷ cos 60° = 2 (secant).
  • Mixing up adjacent and opposite. Cosine uses the side next to the angle, not the one across from it.
  • Dropping the sign. Angles between 90° and 270° have negative cosines: cos 120° = −0.5.
  • Splitting a sum. cos(30° + 60°) = cos 90° = 0, not 0.8660 + 0.5.

Key Terms

Adjacent
The side next to the angle θ that is not the hypotenuse.
Hypotenuse
The longest side of a right triangle, opposite the right angle.
Unit circle
A circle of radius 1; cos θ is the x-coordinate of the point at angle θ.
Radian
The angle whose arc equals the radius; 2π radians make a full turn.
Secant
The reciprocal of cosine: sec θ = 1 ÷ cos θ.
Arccos
The inverse of cosine, written cos⁻¹ or acos.

How to Use the Cosine Calculator

  1. Enter the angle. Type the angle θ, for example 60, or press one of the angle buttons (30°, 45°, 60° and 90° in degrees, π/6, π/4, π/3 and π/2 in radians). In radians you can type a decimal such as 1 or a multiple of π such as pi/3 or 2π/3.
  2. Choose degrees or radians. Pick Degrees (°) or Radians (rad). Typing 60° or 1 rad also sets the unit for that angle.
  3. Read and copy the result. cos θ appears as you type, to 10 decimal places, with the exact value where there is one (for example cos(30°) = √3/2 ≈ 0.8660254038). The table below shows the angle in the other unit, the quadrant, sin θ and tan θ. Press Copy to copy the result, or Clear or Esc to start again.

Example: enter 120 in degrees and the result is −0.5, with the exact value −1/2, the note that 120° is in quadrant II with a reference angle of 60°, and 120° = 2π/3 rad.

Who Can Use This Calculator?

Students and TeachersRight triangles, the unit circle and trig homework
Engineers and BuildersHorizontal runs, force components and the law of cosines
Physics and ElectronicsWaves, phase angles and power factor
Programmers and Game DevelopersRotation, circular motion and vector angles

Frequently Asked Questions (FAQs)

What is the cosine of an angle?

In a right triangle, the cosine of an angle θ is the length of the side next to θ (the adjacent side) divided by the hypotenuse: cos θ = adjacent ÷ hypotenuse. On the unit circle (radius 1), cos θ is the x-coordinate of the point at angle θ, which defines cosine for every angle, including negative angles and angles over 90°.

What is cos 0°, cos 30°, cos 45°, cos 60° and cos 90°?

cos 0° = 1, cos 30° = √3/2 ≈ 0.8660, cos 45° = √2/2 ≈ 0.7071, cos 60° = 1/2 = 0.5 and cos 90° = 0. Also cos 180° = −1. In radians these are cos(0), cos(π/6), cos(π/4), cos(π/3), cos(π/2) and cos(π).

What is the difference between sine and cosine?

Sine uses the side opposite the angle and cosine uses the side next to it. On the unit circle, cosine is the x-coordinate and sine is the y-coordinate. The two graphs are the same wave shifted by 90°: cos θ = sin(θ + 90°), and cos θ = sin(90° − θ), so cos 60° = sin 30° = 0.5.

When is cosine negative?

Cosine is positive in quadrants I and IV (angles between −90° and 90°) and negative in quadrants II and III (between 90° and 270°). For example cos 120° = −0.5 and cos 180° = −1. It always lies between −1 and 1.

Should I use degrees or radians?

Use the unit your angle is in. Geometry and everyday angles use degrees; calculus, physics and programming languages use radians, with 180° = π radians. Mixing them up is the most common mistake: cos(60) in radians is about −0.9524, not 0.5.

Is cos⁻¹ the same as 1/cos?

No. cos−1(x) usually means arccos, the inverse function that gives the angle whose cosine is x: cos−1(0.5) = 60°. The reciprocal 1 ÷ cos θ is a different function called secant, sec θ: sec 60° = 2.

Why does my calculator or code give 6.12e-17 for cos 90°?

Programs work in radians and cannot store π exactly, so Math.cos(Math.PI / 2) in JavaScript and math.cos(math.pi / 2) in Python return about 6.12 × 10−17 instead of 0, and cos 60° comes out as 0.5000000000000001. This calculator works in degrees for special angles, so cos 90° is exactly 0 and cos 60° is exactly 0.5.

What is the law of cosines?

It finds a side of any triangle from the other two sides and the angle between them: c2 = a2 + b2 − 2ab cos C. With sides 5 and 8 and a 60° angle between them, c2 = 25 + 64 − 80 × 0.5 = 49, so c = 7. When C = 90°, cos C = 0 and it becomes Pythagoras’ theorem.

Is cosine an even function?

Yes. cos(−θ) = cos θ, so the cosine graph is symmetric about the y-axis: cos(−60°) = cos 60° = 0.5. Sine, by contrast, is odd: sin(−θ) = −sin θ.

Is the Cosine Calculator free?

Yes. It is completely free, needs no sign-up, and can be used as many times as you like.

Try our Cosine Calculator to find cos θ for any angle in degrees or radians instantly.