Cosine Calculator — cos(x) in Degrees or Radians

cos(x)

--

Angle in Degrees

--

Angle in Radians

--

How the Cosine Function Works

The cosine function is a fundamental trigonometric function that returns the ratio of the adjacent side to the hypotenuse in a right triangle. Given an angle theta in a right triangle, cos(theta) = adjacent / hypotenuse. According to Wolfram MathWorld, cosine is one of the six standard trigonometric functions and is defined for all real numbers, producing output values between -1 and 1 inclusive. The cosine function has a period of 360 degrees (2pi radians), meaning it repeats its values every full rotation. Unlike sine, cosine is an even function -- cos(-x) = cos(x) for all angles x -- which means its graph is symmetric about the y-axis.

On the unit circle (a circle with radius 1 centered at the origin), the cosine of an angle equals the x-coordinate of the point where the terminal side of the angle intersects the circle. This geometric definition extends cosine beyond the 0-90 degree range of right triangles to all angles, including negative angles and angles greater than 360 degrees. The cosine function is essential across mathematics, physics, engineering, signal processing, and computer graphics, appearing in the dot product, Fourier transforms, rotation matrices, and wave equations. Our sine calculator covers the complementary trigonometric function.

The Cosine Formula and How It Is Calculated

In a right triangle with angle theta:

cos(theta) = Adjacent Side / Hypotenuse

The variables are:

To convert between degrees and radians: radians = degrees x pi / 180. For example, 60 degrees = 60 x pi/180 = pi/3 radians.

Worked example: Find cos(60 degrees). In a 30-60-90 triangle with hypotenuse = 2, the side adjacent to the 60-degree angle has length 1. Therefore cos(60) = 1/2 = 0.5. In radians, cos(pi/3) = 0.5. You can verify this with the calculator above.

Key Terms You Should Know

Exact Cosine Values for Common Angles

The following table lists exact cosine values for standard angles used in mathematics, physics, and engineering. These values are derived from the properties of special right triangles (30-60-90 and 45-45-90) and the unit circle.

DegreesRadiansExact ValueDecimalQuadrant
0011.000000I (positive x-axis)
30pi/6sqrt(3)/20.866025I
45pi/4sqrt(2)/20.707107I
60pi/31/20.500000I
90pi/200.000000Boundary (I/II)
1202pi/3-1/2-0.500000II
1353pi/4-sqrt(2)/2-0.707107II
1505pi/6-sqrt(3)/2-0.866025II
180pi-1-1.000000Boundary (II/III)
2703pi/200.000000Boundary (III/IV)
3602pi11.000000Full rotation

Practical Examples

Example 1: Finding a Side Length in a Right Triangle. A ladder leans against a wall at a 70-degree angle from the ground. The ladder is 20 feet long (the hypotenuse). How far is the base of the ladder from the wall? Distance = hypotenuse x cos(70) = 20 x 0.3420 = 6.84 feet from the wall.

Example 2: Using the Law of Cosines. A triangle has sides a = 8 cm, b = 6 cm, and the included angle C = 45 degrees. Find side c. Using c^2 = a^2 + b^2 - 2ab x cos(C) = 64 + 36 - 2(8)(6) x cos(45) = 100 - 96 x 0.7071 = 100 - 67.88 = 32.12. Therefore c = sqrt(32.12) = 5.67 cm. Our law of cosines calculator automates this calculation for any triangle.

Example 3: Dot Product in Physics. Two force vectors have magnitudes 10 N and 15 N with an angle of 60 degrees between them. The dot product (scalar product) is F1 x F2 x cos(theta) = 10 x 15 x cos(60) = 150 x 0.5 = 75 N. This scalar value is used in calculating work done by a force (W = F x d x cos(theta)) and in determining whether vectors point in similar or opposite directions.

Tips and Common Uses of Cosine

Important Cosine Identities

Trigonometric identities involving cosine are essential tools in algebra, calculus, and applied mathematics. The most important ones include:

These identities are extensively used in simplifying expressions, solving equations, and computing integrals in calculus. The sum and difference formulas, for example, are the mathematical foundation behind Fourier analysis, which decomposes complex signals into sums of sine and cosine waves.

Frequently Asked Questions

What is cos(0) and why does it equal 1?

cos(0) = 1 because at 0 degrees, the adjacent side of a right triangle is identical to the hypotenuse, making their ratio exactly 1. On the unit circle, 0 degrees corresponds to the point (1, 0), where the x-coordinate (cosine) is 1. This is the maximum value the cosine function ever reaches, since the ratio of a side to the hypotenuse can never exceed 1.

How are sine and cosine related to each other?

Cosine is the cofunction of sine, meaning cos(x) = sin(90 - x) for any angle x in degrees. The Pythagorean identity states sin^2(x) + cos^2(x) = 1 for all angles, allowing you to calculate one from the other. Graphically, the cosine wave is identical to the sine wave shifted 90 degrees to the left. Both functions have the same amplitude (1), period (360 degrees), and range ([-1, 1]). Use our sine calculator to compare values.

When is the cosine function negative?

Cosine is negative for angles between 90 and 270 degrees, which corresponds to the second and third quadrants of the coordinate plane. On the unit circle, this is the left half where the x-coordinate is negative. Common negative values include cos(120) = -0.5, cos(135) = -sqrt(2)/2 (approximately -0.707), cos(150) = -sqrt(3)/2 (approximately -0.866), and cos(180) = -1, which is the minimum value cosine ever reaches.

What is the law of cosines and when do you use it?

The law of cosines states that c^2 = a^2 + b^2 - 2ab cos(C), where a, b, c are sides of any triangle and C is the angle opposite side c. Use it to find unknown sides when you know two sides and the included angle (SAS case), or to find unknown angles when you know all three sides (SSS case). It generalizes the Pythagorean theorem, which is its special case when C = 90 degrees and the -2ab cos(90) term equals zero. Our law of cosines calculator solves these problems automatically.

How do you convert between degrees and radians for cosine calculations?

To convert degrees to radians, multiply the degree value by pi/180. To convert radians to degrees, multiply by 180/pi. For example, 60 degrees = 60 x (pi/180) = pi/3 radians (approximately 1.0472). Most programming languages (JavaScript, Python, C) and scientific computing tools use radians as the default unit for trigonometric functions, so degree-to-radian conversion is essential when working with measured angles.

What are the exact cosine values for common angles?

The exact cosine values for the most commonly used angles are: cos(0) = 1, cos(30) = sqrt(3)/2 (approximately 0.866), cos(45) = sqrt(2)/2 (approximately 0.707), cos(60) = 1/2 = 0.5, cos(90) = 0, cos(120) = -1/2, cos(150) = -sqrt(3)/2, cos(180) = -1, cos(270) = 0, and cos(360) = 1. These values come from the 30-60-90 and 45-45-90 special right triangles and the unit circle.

Related Calculators