Cosine Calculator Formula

Understand the math behind the cosine calculator. Each variable explained with a worked example.

Formulas Used

Cosine Val

cosine_val = cos(angle_deg * pi / 180)

Sine Val

sine_val = sin(angle_deg * pi / 180)

Tangent Val

tangent_val = tan(angle_deg * pi / 180)

Variables

VariableDescriptionDefault
angle_degAngle (degrees)(deg)60

How It Works

Cosine Function

Definition

In a right triangle, cos(angle) = adjacent / hypotenuse.

On the unit circle, cos(angle) is the x-coordinate of the point at that angle.

Key Values

| Angle | cos | |-------|-----| | 0° | 1 | | 30° | √3/2 ≈ 0.8660 | | 45° | √2/2 ≈ 0.7071 | | 60° | 0.5 | | 90° | 0 |

Worked Example

Calculate cos(60°).

angle_deg = 60
  1. 01cos(60°) = 0.5
  2. 02sin(60°) = √3/2 ≈ 0.8660
  3. 03tan(60°) = √3 ≈ 1.7321

Ready to run the numbers?

Open Cosine Calculator