SQLite Math Functions
This page organizes commonly used SQLite math functions to help you perform math operations conveniently and efficiently.
-
abs
The SQLiteabs()
function returns the absolute value of the value specified by the parameter. -
acos
The SQLiteacos()
function returns the arc cosine of the specified number. -
acosh
The SQLiteacosh()
function returns the inverse hyperbolic cosine of a specified number. -
asin
The SQLiteasin()
function returns the arc sine of the specified number. -
asinh
The SQLiteasinh()
function returns the inverse hyperbolic sine of the specified number. -
atan
The SQLiteatan()
function returns the arctangent of the specified number. -
atan2
The SQLiteatan2()
function returns the arc tangent of the result of dividing the specified two numbers, in radians. -
atanh
The SQLiteatanh()
function returns the inverse hyperbolic tangent of the specified number. -
ceil
The SQLiteceil()
function returns the smallest integer value greater than or equal to the number specified by the parameter. -
ceiling
The SQLiteceiling()
function returns the smallest integer value greater than or equal to the number specified by the parameter. -
cos
The SQLitecos()
function returns the cosine of the specified radian. -
cosh
The SQLitecosh()
function returns the hyperbolic cosine of the specified number. -
degrees
The SQLitedegrees()
function converts the specified radian value to a degree value and returns the result. -
floor
The SQLitefloor()
function returns the largest integer value less than or equal to the number specified by the parameter. -
ln
The SQLiteln()
function returns the natural logarithm of the number specified by the parameter. -
log
The SQLitelog()
function returns the logarithm of the base (10 default) specified by the parameter.parameter. -
log10
The SQLitelog10()
function returns the base 10 logarithm for the number specified by the parameter. -
log2
The SQLitelog2()
function returns the base 2 logarithm for the number specified by the parameter. -
max(x,y,...)
The SQLitemax(x,y,...)
function returns the largest value in the parameter list. -
min(x,y,...)
The SQLitemin(x,y,...)
function returns the smallest value in the parameter list. -
mod
The SQLitemod()
function returns the remainder after dividing the specified two numbers. -
pi
The SQLitepi()
function returns an approximation of π. -
pow
The SQLitepow()
function returns a specified number raised to the specified power. -
power
The SQLitepower()
function returns a specified number raised to the specified power. -
radians
The SQLiteradians()
unction converts the specified value in degrees to radians and returns the result. -
random
The SQLiterandom()
function returns a pseudorandom integer between -9223372036854775808 and +9223372036854775807. -
round
The SQLiteround()
function rounds the given number to the specified number of decimal places and returns the result. -
sign
The SQLitesign()
function returns the sign of the specified number, and returns1
,-1
, or0
respectively if the parameter is positive, negative, or zero. -
sin
The SQLitesin()
function returns the sine of the specified radian. -
sinh
The SQLitesinh()
function returns the hyperbolic sine of the specified number. -
sqrt
The SQLitesqrt()
function returns the square root of a given number. -
tan
The SQLitetan()
function returns the tangent of the specified radian. -
tanh
The SQLitetanh()
function returns the hyperbolic tangent of the specified number. -
trunc
The SQLitetrunc()
function returns the integer part of the specified number.