This SQL Server math functions page offers a comprehensive collection of mathematical functions. These math functions empower your SQL queries with advanced computational capabilities.
If you’re manipulating numerical data, performing complex calculations, or analyzing trends, SQL Server offers an array of functions to meet your mathematical needs.
Function | Description |
---|---|
ABS | Return the absolute value of a number. |
ACOS | Return an angle (in radians) of a specified cosine. |
ASIN | Return an angle (in radians) of a specified sine. |
ATAN | Return the arctangent (in radians) of a specified tangent. |
CEILING | Round a number to the nearest integer greater than or equal to the input number. |
COS | Return the cosine of the specified angle, measured in radians. |
COT | Return the cotangent of the specified angle, which is the reciprocal of the tangent. |
DEGREES | Convert an angle value in radians to degrees. |
EXP | Return the exponential value of a number. |
FLOOR | Round a number to the nearest integer less than or equal to the input value. |
LOG | Return the natural logarithm of a float with a specific base (default to e). |
PI | Return the constant value of PI, accurate to 15 digits. |
POWER | Return the result of raising a number to a specific power. |
RAND | Return a random float between 0 and 1. |
RADIANS | Convert an angle value in degrees to radians. |
ROUND | Return a number rounded to a specified precision. |
SIGN | Return the sign of a number, 1 for positive, -1 for negative, and 0 for zero. |
SIN | Return the sine of an angle in radians. |
SQRT | Return the square root of a float. |
SQUARE | Return the square of a number. |
TAN | Return the tangent of the specified angle, measured in radians. |
Was this tutorial helpful?