SQL Server Mathematical Functions

This page lists the commonly used mathematical functions in SQL Server.

  1. ABS

    In SQL Server, the ABS() function is used to return the absolute value of a specified numeric expression.
  2. ACOS

    The ACOS() function is a mathematical function in SQL Server that returns the inverse cosine value (in radians) of a given number.
  3. ASIN

    The ASIN() function is a trigonometric function in SQL Server used to calculate the inverse sine value.
  4. ATAN

    In SQL Server, the ATAN() function is used to return the arctangent of a given number.
  5. CEILING

    In SQL Server, CEILING() is a mathematical function used to round a number up to the nearest integer.
  6. COS

    COS() is a mathematical function in SQL Server used to calculate the cosine value of a given angle.
  7. DEGREES

    The SQL Server DEGREES() function is used to convert radians to degrees.
  8. EXP

    The SQL Server EXP() function returns the value of the mathematical constant e raised to a specified power, which is the exponential value of a given number.
  9. FLOOR

    In SQL Server, the FLOOR() function is used to return the largest integer that is less than or equal to a given numeric expression.
  10. LOG

    The LOG() function in SQL Server returns the natural logarithm of a given number.
  11. LOG10

    In SQL Server, the LOG10() function is used to return the logarithm to the base 10 of a given number.
  12. PI

    The PI() function is used to return the value of Pi, which is approximately equal to 3.14159265358979.
  13. POWER

    The SQL Server POWER() function is used to return a given expression raised to the specified power.
  14. RADIANS

    In Sql Server, the RADIANS() function is used to convert angle values to radian values.
  15. RAND

    In SQL Server, the RAND() function is used to generate a random number.
  16. ROUND

    In SQL Server, the ROUND() function is used to round a number to a specified number of decimal places.
  17. SIGN

    The SIGN() function in SQL Server returns the sign of a given number, i.e., 1 for positive numbers, -1 for negative numbers, and 0 for zero.
  18. SIN

    The SQL Server SIN() function is a mathematical function used to return the sine value of a given angle.
  19. SQRT

    SQRT() is a mathematical function in SQL Server used to calculate the square root of a given number.
  20. TAN

    The TAN() function in SqlServer is used to return the tangent value of a number.