Understanding the Inverse Cosine (arccos)
The inverse cosine, written cos⁻¹(x) or arccos(x), answers the question "which angle has a cosine of x?" Given a ratio x between -1 and 1, it returns the single angle θ that satisfies cos(θ) = x. This calculator implements exactly that: enter x, and it solves for θ using the JavaScript Math.acos() function, then converts the result to degrees, radians, and degrees-minutes-seconds.
The formula
For any x with -1 ≤ x ≤ 1:
- θ = cos⁻¹(x), measured in radians by definition, with 0 ≤ θ ≤ π
- In degrees: θ = cos⁻¹(x) × 180/π, with 0° ≤ θ ≤ 180°
- Check: plugging θ back into cosine always returns the original input, cos(cos⁻¹(x)) = x
Because cosine only ever outputs values between -1 and 1, any x outside that interval has no real solution — there is no real angle whose cosine equals 2, for example.
Why the output range is restricted to 0°–180°
Cosine is periodic and even, so many different angles share the same cosine value — cos(60°), cos(-60°), and cos(300°) are all 0.5. A function can only return one output per input, so cos⁻¹ is defined on the restricted, or "principal," range of 0° to 180° (0 to π radians). Within that half-circle, every cosine value from -1 to 1 occurs exactly once, which is what makes the inverse well-defined.
Degrees, radians, and DMS
Radians are the "native" unit for inverse trig functions in mathematics and most programming languages; multiply by 180/π to convert to degrees, or by π/180 to go the other way. Degrees-minutes-seconds (DMS) format — where each degree splits into 60 minutes and each minute into 60 seconds — is still standard in surveying, astronomy, and navigation, so this calculator provides all three side by side.
Common applications
- Finding an unknown angle in a right triangle when the adjacent side and hypotenuse are known: θ = cos⁻¹(adjacent / hypotenuse)
- Resolving vector directions in physics and engineering, where a dot-product ratio needs to be converted back to an angle
- Navigation, surveying, and robotics, where DMS angle output is often required