SQL Server RADIANS() Function

The RADIANS() function in SQL Server converts an angle measured in degrees to its equivalent in radians. This is a fundamental trigonometric function, essential for many mathematical and scientific calculations.



RADIANS(): Definition and Usage

Radians and degrees are two different units for measuring angles. Radians are based on the radius of a circle, while degrees divide a circle into 360 parts. The RADIANS() function is necessary when you need to work with angles in radians, which is often required by trigonometric functions like SIN(), COS(), and TAN() that expect angles in radians as input.

Syntax

Syntax

RADIANS(number)
      

Parameter Values

Parameter Description
number The angle measured in degrees. This is required and must be a numeric value.

Examples

Converting Degrees to Radians

This example converts 180 degrees to radians.

Syntax

SELECT RADIANS(180);
      
Output

3.14159265358979
      

Converting Negative Degrees to Radians

Converting -45 degrees to radians.

Syntax

SELECT RADIANS(-45);
      
Output

-0.785398163397448
      

**Note:** The output values are approximate due to the nature of floating-point numbers. The exact values might differ very slightly depending on your SQL Server version.