SQLite Math Functions

This page organizes commonly used SQLite math functions to help you perform math operations conveniently and efficiently.

  1. abs

    The SQLite abs() function returns the absolute value of the value specified by the parameter.
  2. acos

    The SQLite acos() function returns the arc cosine of the specified number.
  3. acosh

    The SQLite acosh() function returns the inverse hyperbolic cosine of a specified number.
  4. asin

    The SQLite asin() function returns the arc sine of the specified number.
  5. asinh

    The SQLite asinh() function returns the inverse hyperbolic sine of the specified number.
  6. atan

    The SQLite atan() function returns the arctangent of the specified number.
  7. atan2

    The SQLite atan2() function returns the arc tangent of the result of dividing the specified two numbers, in radians.
  8. atanh

    The SQLite atanh() function returns the inverse hyperbolic tangent of the specified number.
  9. ceil

    The SQLite ceil() function returns the smallest integer value greater than or equal to the number specified by the parameter.
  10. ceiling

    The SQLite ceiling() function returns the smallest integer value greater than or equal to the number specified by the parameter.
  11. cos

    The SQLite cos() function returns the cosine of the specified radian.
  12. cosh

    The SQLite cosh() function returns the hyperbolic cosine of the specified number.
  13. degrees

    The SQLite degrees() function converts the specified radian value to a degree value and returns the result.
  14. floor

    The SQLite floor() function returns the largest integer value less than or equal to the number specified by the parameter.
  15. ln

    The SQLite ln() function returns the natural logarithm of the number specified by the parameter.
  16. log

    The SQLite log() function returns the logarithm of the base (10 default) specified by the parameter.parameter.
  17. log10

    The SQLite log10() function returns the base 10 logarithm for the number specified by the parameter.
  18. log2

    The SQLite log2() function returns the base 2 logarithm for the number specified by the parameter.
  19. max(x,y,...)

    The SQLite max(x,y,...) function returns the largest value in the parameter list.
  20. min(x,y,...)

    The SQLite min(x,y,...) function returns the smallest value in the parameter list.
  21. mod

    The SQLite mod() function returns the remainder after dividing the specified two numbers.
  22. pi

    The SQLite pi() function returns an approximation of π.
  23. pow

    The SQLite pow() function returns a specified number raised to the specified power.
  24. power

    The SQLite power() function returns a specified number raised to the specified power.
  25. radians

    The SQLite radians() unction converts the specified value in degrees to radians and returns the result.
  26. random

    The SQLite random() function returns a pseudorandom integer between -9223372036854775808 and +9223372036854775807.
  27. round

    The SQLite round() function rounds the given number to the specified number of decimal places and returns the result.
  28. sign

    The SQLite sign() function returns the sign of the specified number, and returns 1, -1, or 0 respectively if the parameter is positive, negative, or zero.
  29. sin

    The SQLite sin() function returns the sine of the specified radian.
  30. sinh

    The SQLite sinh() function returns the hyperbolic sine of the specified number.
  31. sqrt

    The SQLite sqrt() function returns the square root of a given number.
  32. tan

    The SQLite tan() function returns the tangent of the specified radian.
  33. tanh

    The SQLite tanh() function returns the hyperbolic tangent of the specified number.
  34. trunc

    The SQLite trunc() function returns the integer part of the specified number.