How to convert radians to degrees in JavaScript

Converting radians to degrees is essential for trigonometric calculations, angle measurements, geometric computations, and implementing features like rotation controls or navigation systems in JavaScript applications. With over 25 years of experience in software development and as the creator of CoreUI, I’ve implemented radian-to-degree conversion in components like rotation sliders, compass displays, and geometric utilities where presenting angles in familiar degree units enhances user understanding. From my extensive expertise, the standard mathematical approach is multiplying radians by 180/π, using JavaScript’s built-in Math.PI constant for precision. This method provides accurate conversion following the fundamental relationship between these angular measurement systems.

Multiply radians by 180/π to convert to degrees.

const radians = Math.PI / 2
const degrees = radians * (180 / Math.PI)
// Result: 90

const radiansToDegrees = (rad) => rad * (180 / Math.PI)
// Usage: radiansToDegrees(Math.PI) returns 180

The conversion formula radians * (180 / Math.PI) is based on the mathematical relationship that π radians equals 180 degrees. In this example, Math.PI / 2 radians (which is π/2) converts to 90 degrees because π/2 × (180/π) = 90. The function version provides a reusable converter for any radian value. Math.PI provides the precise value of π, ensuring accurate calculations. Common conversions: π radians = 180°, π/2 radians = 90°, 2π radians = 360°.

Best Practice Note:

This is the same approach we use in CoreUI components for angle displays, rotation controls, and geometric calculations across our component library. Create a utility function for reusability: const toDegrees = rad => rad * 180 / Math.PI. The inverse conversion uses degrees * (Math.PI / 180). Consider rounding results for display purposes: Math.round(degrees * 100) / 100 for two decimal places. This conversion is essential when working with trigonometric functions that return radians but need degree display.


Speed up your responsive apps and websites with fully-featured, ready-to-use open-source admin panel templates—free to use and built for efficiency.


About the Author