Cosine Calculator
Use this cosine calculator to find \( \cos(\theta) \), calculate inverse cosine \( \cos^{-1}(x) \), solve a right-triangle cosine ratio, or use the Law of Cosines for non-right triangles. Cosine is one of the three main trigonometric ratios and is especially important for angles, triangles, waves, vectors, geometry, physics, and calculus. Enter your values below, choose the correct calculation type, and the calculator will show the result with the matching formula.
Calculate Cosine
Select the calculation type. Use the basic cosine option for \( \cos(\theta) \), inverse cosine for \( \cos^{-1}(x) \), right-triangle ratio for \( \frac{\text{adjacent}}{\text{hypotenuse}} \), or Law of Cosines for a side or angle in a general triangle.
Result
The answer is rounded to your selected number of decimal places. Standard exact values such as \( \cos(60^\circ)=\frac{1}{2} \) may appear as decimals in the calculator output.
Cosine Formula
In a right triangle, cosine compares the length of the side adjacent to an angle with the length of the hypotenuse. The basic cosine ratio is:
Where \( \theta \) is the angle, the adjacent side is the side next to the angle that is not the hypotenuse, and the hypotenuse is the longest side of the right triangle. Cosine values can also be defined using the unit circle. On the unit circle, \( \cos(\theta) \) is the \(x\)-coordinate of the point where the terminal side of the angle meets the circle.
Right-triangle definition
For acute angles in a right triangle, cosine is the ratio of adjacent side to hypotenuse. This is the most common first definition students learn.
Unit-circle definition
For any angle, including angles greater than \(90^\circ\) or negative angles, cosine is the \(x\)-coordinate on the unit circle.
How to Use the Cosine Calculator
- Choose the calculation type: cosine, inverse cosine, right-triangle ratio, Law of Cosines side, or Law of Cosines angle.
- Select degrees or radians if your calculation uses an angle.
- Enter the known values. For basic cosine, enter the angle. For inverse cosine, enter a value from \(-1\) to \(1\).
- For a right triangle, enter the adjacent side and hypotenuse. The calculator evaluates \(\frac{\text{adjacent}}{\text{hypotenuse}}\).
- For the Law of Cosines, enter the two known sides and either the included angle or the third side, depending on what you want to find.
- Click Calculate Cosine and read the formula substitution shown in the result area.
Common Cosine Formulas
Cosine appears in many forms across trigonometry, geometry, and algebra. The table below gives the most useful cosine formulas and explains when to use them.
| Formula or identity | Mathematical form | When to use it |
|---|---|---|
| Right-triangle cosine | \(\cos(\theta)=\frac{\text{adjacent}}{\text{hypotenuse}}\) | Use when you have a right triangle and need a side ratio or an angle. |
| Inverse cosine | \(\theta=\cos^{-1}(x)\) | Use when you know the cosine value and need the angle. |
| Law of Cosines | \(c^2=a^2+b^2-2ab\cos C\) | Use for non-right triangles when two sides and the included angle are known. |
| Law of Cosines angle form | \(\cos C=\frac{a^2+b^2-c^2}{2ab}\) | Use when all three sides are known and you need an angle. |
| Pythagorean identity | \(\sin^2(\theta)+\cos^2(\theta)=1\) | Use to connect sine and cosine or simplify trigonometric expressions. |
| Even-function identity | \(\cos(-\theta)=\cos(\theta)\) | Use when simplifying cosine of negative angles. |
| Cosine angle addition | \(\cos(A+B)=\cos A\cos B-\sin A\sin B\) | Use in exact-value problems, proofs, and transformations. |
| Cosine angle subtraction | \(\cos(A-B)=\cos A\cos B+\sin A\sin B\) | Use to expand or evaluate cosine of a difference of angles. |
Exact Cosine Values
Some cosine values appear so often that students are expected to know them. These come from special right triangles and the unit circle.
| Angle in degrees | Angle in radians | Exact cosine value | Decimal value |
|---|---|---|---|
| \(0^\circ\) | \(0\) | \(1\) | 1 |
| \(30^\circ\) | \(\frac{\pi}{6}\) | \(\frac{\sqrt{3}}{2}\) | 0.8660 |
| \(45^\circ\) | \(\frac{\pi}{4}\) | \(\frac{\sqrt{2}}{2}\) | 0.7071 |
| \(60^\circ\) | \(\frac{\pi}{3}\) | \(\frac{1}{2}\) | 0.5 |
| \(90^\circ\) | \(\frac{\pi}{2}\) | \(0\) | 0 |
| \(180^\circ\) | \(\pi\) | \(-1\) | -1 |
| \(270^\circ\) | \(\frac{3\pi}{2}\) | \(0\) | 0 |
| \(360^\circ\) | \(2\pi\) | \(1\) | 1 |
The calculator gives decimal values, but exact values are still important. For example, \(\cos(60^\circ)\) is exactly \(\frac{1}{2}\), and \(\cos(45^\circ)\) is exactly \(\frac{\sqrt{2}}{2}\). In many algebra and trigonometry courses, exact values are preferred over decimal approximations because they preserve mathematical precision.
Worked Examples
Example 1: Find cosine of an angle
Find \(\cos(60^\circ)\).
The result is \(0.5\). On the unit circle, the point at \(60^\circ\) has an \(x\)-coordinate of \(\frac{1}{2}\), so the cosine value is \(\frac{1}{2}\).
Example 2: Use the right-triangle cosine ratio
A right triangle has an adjacent side of \(8\) and a hypotenuse of \(10\). Find the cosine of the angle.
The cosine of the angle is \(0.8\). If you need the angle itself, use inverse cosine: \(\theta=\cos^{-1}(0.8)\approx36.87^\circ\).
Example 3: Find an angle using inverse cosine
Find \(\theta\) if \(\cos(\theta)=0.342\).
The principal angle is approximately \(70.01^\circ\). In many calculator contexts, inverse cosine returns an angle from \(0^\circ\) to \(180^\circ\).
Example 4: Use the Law of Cosines to find a side
Suppose \(a=7\), \(b=9\), and the included angle is \(C=60^\circ\). Find side \(c\).
The missing side is approximately \(8.19\). This is a non-right-triangle use of cosine.
Example 5: Use the Law of Cosines to find an angle
Suppose a triangle has sides \(a=6\), \(b=8\), and \(c=10\). Find angle \(C\).
The angle is \(90^\circ\), so this triangle is a right triangle. This example also shows how the Law of Cosines extends the Pythagorean Theorem.
Complete Guide to Cosine
Cosine is one of the core functions in trigonometry. Along with sine and tangent, it connects angles to ratios, coordinates, graphs, and real-world measurements. In early geometry, cosine is introduced as a right-triangle ratio. In algebra and precalculus, cosine becomes a function that can take any angle as input. In calculus, physics, engineering, and signal analysis, cosine becomes a wave function that models periodic behavior. This calculator is designed to support all of those contexts by giving not only a numerical answer but also the formula behind the calculation.
The simplest way to understand cosine is through a right triangle. Choose one acute angle in the triangle. The side touching that angle, other than the hypotenuse, is called the adjacent side. The hypotenuse is the side opposite the right angle and is always the longest side in a right triangle. The cosine of the angle is the ratio of the adjacent side to the hypotenuse. This is written as \(\cos(\theta)=\frac{\text{adjacent}}{\text{hypotenuse}}\). Because the adjacent side of a right triangle cannot be longer than the hypotenuse, cosine values for acute angles are between \(0\) and \(1\).
For example, if a right triangle has an adjacent side of \(5\) and a hypotenuse of \(13\), then the cosine of the angle is \(\frac{5}{13}\), which is approximately \(0.3846\). This ratio does not depend on the size of the triangle alone. If another triangle has the same angle but all sides are scaled up, the adjacent side and hypotenuse scale by the same factor, so their ratio stays the same. That is why cosine is a function of the angle, not merely a function of the side lengths.
Cosine as a unit-circle coordinate
The right-triangle definition is useful, but it only directly covers acute angles between \(0^\circ\) and \(90^\circ\). To define cosine for all angles, mathematicians use the unit circle. The unit circle is a circle with radius \(1\) centered at the origin of the coordinate plane. If an angle \(\theta\) is placed in standard position, its terminal side meets the unit circle at a point \((x,y)\). The cosine of the angle is the \(x\)-coordinate of that point:
This definition allows cosine to be positive, negative, or zero. In Quadrant I, the \(x\)-coordinate is positive, so cosine is positive. In Quadrant II, the \(x\)-coordinate is negative, so cosine is negative. In Quadrant III, cosine is also negative. In Quadrant IV, cosine becomes positive again. This sign pattern is essential for solving trigonometric equations and interpreting graphs.
Degrees and radians
Angles can be measured in degrees or radians. Degrees divide a full turn into \(360^\circ\). Radians measure angles using arc length on a circle. A full turn is \(2\pi\) radians, so \(180^\circ=\pi\) radians. This relationship gives the conversion formulas:
Many calculator errors happen because the wrong angle mode is selected. For example, \(\cos(60^\circ)=0.5\), but \(\cos(60)\) in radians is not \(0.5\). If your angle is written with a degree symbol, choose degrees. If your angle is written with \(\pi\), such as \(\frac{\pi}{3}\), use radians. The calculator above lets you choose the correct mode so the output matches the form of your problem.
Cosine and the unit circle
The unit circle is one of the best tools for understanding cosine values. At \(0^\circ\), the point on the unit circle is \((1,0)\), so \(\cos(0^\circ)=1\). At \(90^\circ\), the point is \((0,1)\), so \(\cos(90^\circ)=0\). At \(180^\circ\), the point is \((-1,0)\), so \(\cos(180^\circ)=-1\). At \(270^\circ\), the point is \((0,-1)\), so \(\cos(270^\circ)=0\).
These values show the periodic nature of cosine. After a full turn of \(360^\circ\) or \(2\pi\) radians, the point returns to its starting location, so the cosine value repeats. The periodic identity is:
In degrees, the same idea is \(\cos(\theta+360^\circ)=\cos(\theta)\). This means \(\cos(30^\circ)\), \(\cos(390^\circ)\), and \(\cos(-330^\circ)\) all have the same value because the angles are coterminal.
Cosine graph
The graph of \(y=\cos x\) is a smooth wave. It starts at \(1\) when \(x=0\), decreases to \(0\) at \(\frac{\pi}{2}\), reaches \(-1\) at \(\pi\), returns to \(0\) at \(\frac{3\pi}{2}\), and returns to \(1\) at \(2\pi\). This pattern repeats forever in both directions.
The maximum value of cosine is \(1\), and the minimum value is \(-1\). Therefore, the range of the cosine function is:
This range is important for inverse cosine. If you try to calculate \(\cos^{-1}(2)\) using real numbers, there is no real angle because cosine can never equal \(2\). The calculator checks this and requires inverse cosine inputs to stay between \(-1\) and \(1\).
Inverse cosine
Inverse cosine, also called arccosine, is used when you know a cosine value and want to find the angle. It is written as \(\cos^{-1}(x)\) or \(\arccos(x)\). For example, since \(\cos(60^\circ)=0.5\), we can write \(\cos^{-1}(0.5)=60^\circ\). In radians, this is \(\cos^{-1}(0.5)=\frac{\pi}{3}\).
Because many angles can share the same cosine value, inverse cosine returns a principal value. In standard calculator settings, \(\arccos(x)\) returns an angle from \(0\) to \(\pi\) radians, or from \(0^\circ\) to \(180^\circ\). This does not mean other angles are impossible. It means the inverse function has a restricted range so that each valid input gives one principal output. For equation solving, you may need to use symmetry and periodicity to find all solutions.
Cosine in right triangles
In right-triangle trigonometry, cosine is used to connect an angle with the adjacent side and hypotenuse. If you know an angle and the hypotenuse, you can find the adjacent side by rearranging the formula:
If you know the adjacent side and the angle, you can find the hypotenuse:
These rearrangements are used in geometry, surveying, construction, physics, navigation, and many word problems. For example, if a ladder makes a \(70^\circ\) angle with the ground and the ladder is \(10\) meters long, the horizontal distance from the wall is \(10\cos(70^\circ)\). Cosine gives the horizontal component because it is adjacent to the angle at the ground.
Cosine and vectors
Cosine is also used to break vectors into components. If a vector has magnitude \(v\) and makes an angle \(\theta\) with the positive \(x\)-axis, its horizontal component is:
The vertical component is \(v_y=v\sin(\theta)\). This is why cosine appears in physics problems involving force, velocity, acceleration, projectiles, inclined planes, and work. If a force acts at an angle, the component of the force in a particular direction is often found using cosine. The idea is the same as the right-triangle ratio: cosine gives the part of the vector adjacent to the angle.
Cosine and the Law of Cosines
The Law of Cosines extends right-triangle ideas to any triangle. It says:
This formula is used when you know two sides and the included angle and need the third side. It can also be rearranged to find an angle when all three sides are known:
The Law of Cosines becomes the Pythagorean Theorem when \(C=90^\circ\), because \(\cos(90^\circ)=0\). The formula becomes \(c^2=a^2+b^2\). This connection shows that the Pythagorean Theorem is a special case of a more general triangle rule.
Cosine identities
Cosine identities help simplify expressions and solve trigonometric equations. The most famous identity is the Pythagorean identity:
This identity comes directly from the unit circle equation \(x^2+y^2=1\). Since \(x=\cos(\theta)\) and \(y=\sin(\theta)\), substituting gives \(\cos^2(\theta)+\sin^2(\theta)=1\). The order is often written either way.
Another useful identity is that cosine is an even function:
This means the cosine of a negative angle is the same as the cosine of the corresponding positive angle. On the unit circle, this happens because reflecting an angle across the \(x\)-axis changes the \(y\)-coordinate but keeps the \(x\)-coordinate the same. Since cosine is the \(x\)-coordinate, it does not change.
Cosine in periodic motion
Cosine is frequently used to model periodic motion. Periodic motion repeats at regular intervals. Examples include sound waves, light waves, tides, rotating wheels, alternating current, Ferris wheels, springs, pendulums, and seasonal temperature patterns. A basic cosine model has the form:
Here, \(A\) controls amplitude, \(B\) controls period, \(C\) controls horizontal shift, and \(D\) controls vertical shift. The basic cosine wave has amplitude \(1\), period \(2\pi\), no horizontal shift, and no vertical shift. Transformations of cosine allow the function to fit real-world cycles.
Cosine compared with sine and tangent
Cosine, sine, and tangent are connected but measure different ratios in a right triangle. Sine compares the opposite side to the hypotenuse. Cosine compares the adjacent side to the hypotenuse. Tangent compares the opposite side to the adjacent side. A common memory aid is SOH-CAH-TOA:
- SOH: \(\sin(\theta)=\frac{\text{opposite}}{\text{hypotenuse}}\)
- CAH: \(\cos(\theta)=\frac{\text{adjacent}}{\text{hypotenuse}}\)
- TOA: \(\tan(\theta)=\frac{\text{opposite}}{\text{adjacent}}\)
Cosine and sine also differ by a phase shift. The graph of cosine is the graph of sine shifted left by \(\frac{\pi}{2}\) radians. This relationship is written as \(\cos(x)=\sin\left(x+\frac{\pi}{2}\right)\). This connection is helpful when comparing wave models.
Common mistakes with cosine
One common mistake is using the wrong side ratio. Cosine uses adjacent over hypotenuse, not opposite over hypotenuse. Another common mistake is confusing degrees and radians. If your calculator is in radians but you enter \(60\) expecting degrees, your answer will be wrong. A third mistake is forgetting that inverse cosine only accepts values from \(-1\) to \(1\). Since cosine cannot be outside that range, \(\cos^{-1}(1.5)\) has no real-angle answer.
Students also sometimes treat \(\cos^{-1}(x)\) as \(\frac{1}{\cos(x)}\). This is not correct. The notation \(\cos^{-1}(x)\) usually means inverse cosine, or arccosine. The reciprocal of cosine is secant and is written \(\sec(x)=\frac{1}{\cos(x)}\). Because this notation can be confusing, many textbooks use \(\arccos(x)\) when they want inverse cosine.
Why cosine matters
Cosine is important because it connects geometry, algebra, and real-world modeling. In geometry, it helps solve triangles. In coordinate geometry, it gives the horizontal coordinate on the unit circle. In physics, it finds components of vectors and forces. In engineering, it appears in waves, circuits, rotations, and oscillations. In calculus, cosine is a fundamental function with derivative \(-\sin(x)\) and integral \(\sin(x)+C\). In data modeling, cosine functions describe repeating patterns.
A good cosine calculator should therefore do more than produce a decimal. It should help users identify the correct formula. If the problem gives an angle, use \(\cos(\theta)\). If the problem gives a cosine value and asks for an angle, use \(\cos^{-1}(x)\). If the problem gives a right triangle, use the adjacent-over-hypotenuse ratio. If the problem gives a non-right triangle, use the Law of Cosines. Choosing the right model is the main skill; the arithmetic is only the final step.
In summary, cosine is a trigonometric function that measures a side ratio in right triangles and an \(x\)-coordinate on the unit circle. Its values range from \(-1\) to \(1\), it repeats every \(2\pi\) radians or \(360^\circ\), and it is used throughout mathematics and science. This cosine calculator gives a quick answer while keeping the formulas visible so students can learn the reasoning behind each result.
Cosine Sign by Quadrant
| Quadrant | Angle range | Sign of cosine | Reason |
|---|---|---|---|
| Quadrant I | \(0^\circ<\theta<90^\circ\) | Positive | The \(x\)-coordinate is positive. |
| Quadrant II | \(90^\circ<\theta<180^\circ\) | Negative | The \(x\)-coordinate is negative. |
| Quadrant III | \(180^\circ<\theta<270^\circ\) | Negative | The \(x\)-coordinate is negative. |
| Quadrant IV | \(270^\circ<\theta<360^\circ\) | Positive | The \(x\)-coordinate is positive. |
This sign pattern is useful when solving trigonometric equations. If a cosine value is positive, solutions occur in Quadrants I and IV. If a cosine value is negative, solutions occur in Quadrants II and III.
Related Calculators and Study Tools
These related tools can help with the next step in your trigonometry or algebra work:
Cosine Calculator FAQs
What is cosine?
Cosine is a trigonometric function. In a right triangle, \(\cos(\theta)=\frac{\text{adjacent}}{\text{hypotenuse}}\). On the unit circle, cosine is the \(x\)-coordinate of the point on the circle.
How do I calculate cosine?
For a right triangle, divide the adjacent side by the hypotenuse. For an angle, enter the angle into a cosine calculator using the correct degree or radian mode.
What is inverse cosine?
Inverse cosine, or arccosine, finds the angle from a cosine value. It is written as \(\cos^{-1}(x)\) or \(\arccos(x)\).
What values can inverse cosine accept?
Inverse cosine accepts real inputs from \(-1\) to \(1\), because ordinary cosine values are always in that range.
Is cosine positive or negative?
Cosine is positive in Quadrants I and IV and negative in Quadrants II and III. This is because cosine is the \(x\)-coordinate on the unit circle.
What is the cosine of 60 degrees?
The exact value is \(\cos(60^\circ)=\frac{1}{2}\), which equals \(0.5\).
What is the cosine of 90 degrees?
The value is \(\cos(90^\circ)=0\). On the unit circle, the point at \(90^\circ\) has an \(x\)-coordinate of \(0\).
What is the Law of Cosines?
The Law of Cosines is \(c^2=a^2+b^2-2ab\cos C\). It is used to solve non-right triangles when two sides and the included angle are known, or when all three sides are known and an angle is needed.






