SQL Server Math Functions

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.

FunctionDescription
ABSReturn the absolute value of a number.
ACOSReturn an angle (in radians) of a specified cosine.
ASINReturn an angle (in radians) of a specified sine.
ATANReturn the arctangent (in radians) of a specified tangent.
CEILINGRound a number to the nearest integer greater than or equal to the input number.
COSReturn the cosine of the specified angle, measured in radians.
COTReturn the cotangent of the specified angle, which is the reciprocal of the tangent.
DEGREESConvert an angle value in radians to degrees.
EXPReturn the exponential value of a number.
FLOORRound a number to the nearest integer less than or equal to the input value.
LOGReturn the natural logarithm of a float with a specific base (default to e).
PIReturn the constant value of PI, accurate to 15 digits.
POWERReturn the result of raising a number to a specific power.
RANDReturn a random float between 0 and 1.
RADIANSConvert an angle value in degrees to radians.
ROUNDReturn a number rounded to a specified precision.
SIGNReturn the sign of a number, 1 for positive, -1 for negative, and 0 for zero.
SINReturn the sine of an angle in radians.
SQRTReturn the square root of a float.
SQUAREReturn the square of a number.
TANReturn the tangent of the specified angle, measured in radians.
Was this tutorial helpful?