Calculate cosine
Enter an angle and select its unit to evaluate the cosine function.
About the cosine function
Cosine is a fundamental trigonometric function that relates an angle to geometry and periodic motion. In a right triangle, the cosine of an acute angle is the length of the adjacent side divided by the hypotenuse. On the unit circle, it is the horizontal coordinate of the point reached by rotating through the angle. The unit-circle definition extends cosine to every real angle, including negative angles and angles larger than one complete rotation.
This calculator accepts degrees, radians, and gradians. Degrees divide a full turn into 360 parts, radians use 2 pi for a full turn, and gradians divide the turn into 400 parts. JavaScript's trigonometric function uses radians internally, so degree inputs are multiplied by pi over 180 and gradian inputs by pi over 200 before evaluation. The converted radian value is displayed to make the calculation easier to verify.
Cosine always returns a value from negative one through positive one. It equals one at zero and every complete rotation, zero at quarter and three-quarter rotations, and negative one at a half rotation. Its sign is positive in quadrants one and four and negative in quadrants two and three. These landmarks are useful for checking calculator results and understanding the shape of the cosine wave.
The function is periodic with a period of 360 degrees, 2 pi radians, or 400 gradians. Adding any complete turn leaves the result unchanged. Cosine is also an even function, so cos of negative x equals cos of x. This symmetry distinguishes it from sine and can simplify equations, graphs, and Fourier models.
Cosine appears in vector dot products, wave mechanics, electrical engineering, navigation, computer graphics, and the law of cosines. The law of cosines generalizes the Pythagorean theorem by connecting three side lengths with the cosine of an included angle. In vectors, cosine measures directional similarity through the angle between vectors. In periodic models, it describes oscillation that begins at a maximum.
Decimal results are rounded to ten places for readable output. Floating-point calculations sometimes produce a tiny number instead of exact zero at special angles; the calculator normalizes extremely small values to zero. For exact mathematical work, familiar special angles may be written with radicals or fractions, such as one-half for 60 degrees. Always confirm the selected unit before interpreting a result, because an input of 60 radians is very different from 60 degrees.
Frequently asked questions
What is the range of cosine?
For every real angle, cosine lies between negative one and positive one inclusive. Those bounds come from the horizontal coordinate of a point on the unit circle.
What is the difference between degrees and radians?
Degrees use 360 units in a full turn, while radians use 2 pi. Both measure the same angles but assign different numeric values to them.
What are gradians?
Gradians divide a full rotation into 400 equal units, making a right angle equal to 100 gradians. They are used in some surveying and engineering contexts.
Why is cosine of 90 degrees zero?
At 90 degrees, the unit-circle point is directly above the origin and its horizontal coordinate is zero. Since cosine is that horizontal coordinate, the result is zero.
Is cosine of a negative angle different?
Cosine is an even function, so changing the sign of an angle does not change its cosine. The corresponding unit-circle points are reflections across the horizontal axis and share an x-coordinate.