# Cos Squared in Excel (Both Degrees and Radians)

Get FREE Advanced Excel Exercises with Solutions!

We use trigonometry in almost every aspect of our life. The value of Cos squared is needed in various types of calculation. If you are curious to know how you can use the COS function in Excel and use it to calculate the squared value of it, then this article may come in handy for you. In this article, we discuss how you can calculate the cos-squared value of the different angles in Excel with elaborate explanations.

## Overview of Cos Squared

The trigonometric identities are the equivalence relations between the various trigonometric functions about any variable. These trigonometric identities are useful for relating distinct trigonometric formulas and connections with a variety of angles. The sine, cosine, cotangent, tangent, cosec, sec and are all examples. Cosθ value actually denotes the ratio of the base with a hypotenuse of a right-angled triangle. Cosine squared is basically the squared term of the Cosine value.

## What Is Cos Squared Equal To?

The basic formula of the cosine squared formula is given below. This formula is also known as the Pythagoras trigonometric formula.

The formula can be manipulated and can be presented in the below format. • Another well-known expression of the cosine squared is given in the below image. • This is one of the lesser knowns but is still used in differential calculus.
• We can convert and create various other entities from this cosine squared value. Like we could get the sine squared value and using both sine and cosine squared values, we can extract the tangent squared values also, which leads to all the other components of the trigonometry. ## How Can We Write Cos Squared in Excel?

First, we show you how to calculate the cos squared value with an example, we need to first how we can use the COS function to write cos squared values in Excel.

Steps

• Here we got the angles in the range of cells B5:B16, in the variable as X.
• We need to get the cosine and cosine squared values of the angles. • Select the cell C5 and enter the formula:

`=COS(3.14159*(B5)/180)` Note

Here the angle argument in the COS function has to be in the radian unit, otherwise, it will show a faulty result. That’s why we need to convert the degree value of the angle to the radian unit.

• Then drag the Fill Handle to cell C16. • Then we will round up the values in the previous step.
• To do this, select the cell D5 and enter the following formula:

`=(COS(3.14159*(B5)/180))^2` • Then drag the Fill Handle to cell D16. ## Use of Cos Squared in Excel

Here, we will use the dataset below to calculate the cos-squared value of different values. The values are both radian and degree values.

### 1. Cos Squared in Excel for Angles in Radians

When you want to insert angles in radians, the COS function is super easy. Because the COS function can work with the angles in radians by default. Anyways follow the steps below to see how to use the COS squared function for angles in radians.

Steps

• Here we got the angles in the radians in the range of cell B5:B9 • Then select cell C5 and enter the following formula:

`=COS(B5)` • Now press the ENTER button to execute the formula.

Finally, finish the whole process the dragging the Fill Handle icon to the end of the Cosine column.

That’s all you need to do. Anyways,  when you complete all the steps above, you will see the end result as in the picture below: • Now we need to calculate the cos squared value, to do this, select cell D5 and enter the following formula:

`=(COS(B5))^2`

• Now press the ENTER button to execute the formula. • Finally, finish the whole process the dragging the Fill Handle icon to the end of the Cosine column.
• That’s all you need to do. Anyways, when you completed all the steps above, you will see the end result as in the picture below: ### 2. Cos Squared in Excel for Angles in Degrees

When you have angles in degrees, then calculate the cosine of the angles you have to perform some extra task. That is to convert the angle from degree to radian. As the COS function accepts only angles in radians.

Steps

• Select cell C5 to store the formula result.
• Then enter the formula:

`=COS(B5*PI()/180)`

• Now press the ENTER button to execute the formula. • Finally, finish the whole process the dragging the Fill Handle icon to the end of the Cosine column.
• That’s all you need to do. Anyways, when you complete all the steps above, you will see the end result as in the picture below: • Now we need to calculate the cos squared value, to do this, select cell D5 and enter the following formula:

`=(COS(B5*PI()/180))^2`

• Now press the ENTER button to execute the formula. Note

Here the angle argument in the COS function has to be in the radian unit, otherwise, it will show a faulty result. That’s why we need to convert the degree unit value of the angle to the radian unit.

• Finally, finish the whole process the dragging the Fill Handle icon to the end of the Cosine column.
• That’s all you need to do. Anyways, when you complete all the steps above, you will see the end result as in the picture below: ### 3. Embedding VBA Code to Find Cos Squared of an Angle

We are going to use a small VBA macro code to find cos squared values of a list of angles.

Steps

• First, go to the Developer tab and click on Visual Basic. If you don’t have that, you have to enable the Developer tab. Or You can also press Alt+F11 to open the Visual Basic Editor. • Then there will be a new dialog box. In that dialog box, click on Insert > Module.
• Next, in the Module editor window, type the following code
``````Sub Cosine_squared()
Dim rng As Range, c As Range
On Error Resume Next
Set rng = Application.InputBox( _
Title:="Exceldemy", _
Prompt:="Select the range of cell that are goin to be Cosine Squared", _
Type:=8)
On Error GoTo 0
For Each c In rng
c.Offset(0, 1).Value = Cos(c.Value * 3.1416 / 180)
c.Offset(0, 2).Value = (Cos(c.Value * 3.1416 / 180)) ^ 2
c.Offset(0, 1).Select
Selection.Value = Format(ActiveCell, "#.00")
c.Offset(0, 2).Select
Selection.Value = Format(ActiveCell, "#.00")
Next
End Sub`````` • Then close the Module window.
• After that, go to the View tab > Macros.
• Then click on View Macros. • After clicking View Macros, select the macros that you created just now. The file name here is Cosine_squared.
• Then click Run. • Then there will be a range box asking for the range of cells that are going to be Cosine squared.
• Select the range of cell B5:B9.
• Click OK after this. • Then you will notice that the range of cells C5:C9 is with the cosine value of the angles in the range of cells B5:B9.
• And the range of cells D5:D9 is filled with the cosine squared value of the angles mentioned in the range of cells B5:B9. ## What Is the Difference Between Cos^2 (x) and Cos (x)^2?

The short answer is, Cos2x = (Cos x)2. And in the other side, Cos(x)2 is equal to the Cosine of the squared value of x. Cos2x and Cos(x)2 mean totally different things. The whole will clear after the example provided below.

Let the angle value is equal to x=30.

So the value of Cos2x will be: And the value of Cos(x)2 is, ## 💬 Things to Remember

• Always remember the angle unit, whether it is on degree or radian. The COS function in Excel expects a radian unit of angle.
• If the angle is in degrees, the user needs to convert the angle by multiplying the angle by (pi/180).
• Be careful with the power over the trigonometry functions, whether the power is over the angle or over the cosine itself because they represent different things.

## Conclusion

To sum it up, the issue of how we use the cos function to square values in Excel using 3 separate examples. The VBA Macro method requires prior VBA-related knowledge to understand from scratch.

For this problem, a macro-enabled workbook is available to download where you can practice these methods.

Feel free to ask any questions or feedback through the comment section.

## What is ExcelDemy?

ExcelDemy Learn Excel & Excel Solutions Center provides free Excel tutorials, free support , online Excel training and Excel consultancy services for Excel professionals and businesses. Feel free to contact us with your Excel problems. Rubayed Razib Suprov

Hi, I am Rubayed Razib Suprov. Graduated from the Bangladesh University of Engineering Technology in Naval Architecture and Marine Engineering department. I joined Exceldemy on March 2022. I have a keen interest in both fluid dynamics and data analysis. I try to teach people what I learned so far about the Excel tool to date, and hope I can make some positive impacts.

We will be happy to hear your thoughts Advanced Excel Exercises with Solutions PDF  