> For the complete documentation index, see [llms.txt](https://mariadb.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mariadb.com/docs/server/reference/sql-functions/numeric-functions.md).

# Numeric Functions

{% columns %}
{% column %}
{% content-ref url="/pages/3JirdwyoMS3zaWv56mvJ" %}
[ABS](/docs/server/reference/sql-functions/numeric-functions/abs.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Calculate absolute value. This function returns the non-negative value of a number, removing any negative sign.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/RIT2ispK37DFy7QhFuX5" %}
[ACOS](/docs/server/reference/sql-functions/numeric-functions/acos.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Calculate arc cosine. This function returns the angle in radians whose cosine is the given number.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/X4kv4imgrnneVZt2oviG" %}
[ASIN](/docs/server/reference/sql-functions/numeric-functions/asin.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Calculate arc cosine. This function returns the angle in radians whose cosine is the given number.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/KaVhCkqC2xwjjeO7cdMV" %}
[ATAN](/docs/server/reference/sql-functions/numeric-functions/atan.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Calculate arc tangent. This function returns the angle in radians whose tangent is the given number.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/ufMBUMNhT0FEKDmBOuVU" %}
[ATAN2](/docs/server/reference/sql-functions/numeric-functions/atan2.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Calculate arc tangent of two variables. This function returns the angle in radians between the positive x-axis and the point (X, Y).
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/Li197sRDINP0gKHAlCRn" %}
[CEIL](/docs/server/reference/sql-functions/numeric-functions/ceil.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Synonym for CEILING(). Rounds a number up to the nearest integer.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/UAhp44OtRBDYjD98grys" %}
[CEILING](/docs/server/reference/sql-functions/numeric-functions/ceiling.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Round up to the nearest integer. This function returns the smallest integer value that is greater than or equal to the argument.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/iuNdApcfeolT54aevTBv" %}
[CONV](/docs/server/reference/sql-functions/numeric-functions/conv.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Convert numbers between bases. This function transforms a number from one numeric base system to another.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/q72mNfstdxq86987NPwB" %}
[COS](/docs/server/reference/sql-functions/numeric-functions/cos.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Calculate cosine. This function returns the cosine of an angle given in radians.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/75Xij20FkZiPEMJq52cP" %}
[COT](/docs/server/reference/sql-functions/numeric-functions/cot.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Calculate cotangent. This function returns the cotangent of an angle given in radians.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/fJuOR8f2BY33JdFAkKhY" %}
[CRC32](/docs/server/reference/sql-functions/numeric-functions/crc32.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Compute cyclic redundancy check. This function returns a 32-bit unsigned integer representing the CRC32 checksum of a string.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/rrFnZgoZP8iyMZ2gH5fo" %}
[CRC32C](/docs/server/reference/sql-functions/numeric-functions/crc32c.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Compute CRC32C checksum. This function calculates a cyclic redundancy check value using the Castagnoli polynomial.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/oJkvGpPqsQ1FJhYWpnBE" %}
[DEGREES](/docs/server/reference/sql-functions/numeric-functions/degrees.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Convert radians to degrees. This function transforms an angle measured in radians to its equivalent in degrees.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/sad4TS9KAgY4LD0PgID7" %}
[DIV](/docs/server/reference/sql-functions/numeric-functions/div.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Perform integer division. This operator divides one number by another and returns the integer result, discarding any remainder.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/xHM29nlkPPWCjx5U0p2x" %}
[EXP](/docs/server/reference/sql-functions/numeric-functions/exp.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Calculate exponential value. This function returns the value of e (the base of natural logarithms) raised to the power of the argument.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/tN0knKdf6jDAqzE36QqZ" %}
[FLOOR](/docs/server/reference/sql-functions/numeric-functions/floor.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Round down to the nearest integer. This function returns the largest integer value that is less than or equal to the argument.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/Q8cOznWryrERXNnOtmy5" %}
[LN](/docs/server/reference/sql-functions/numeric-functions/ln.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Calculate natural logarithm. This function returns the logarithm of a number to the base e.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/iYg7oc6vLYz7akWzSSdD" %}
[LOG](/docs/server/reference/sql-functions/numeric-functions/log.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Calculate logarithm. This function returns the natural logarithm of a number, or the logarithm to a specified base if two arguments are provided.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/zwPtBeU3VpyWRK5LZ8gO" %}
[LOG10](/docs/server/reference/sql-functions/numeric-functions/log10.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Calculate base-10 logarithm. This function returns the logarithm of a number to the base 10.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/72Yk5K3KnwAbWrX0VKUJ" %}
[LOG2](/docs/server/reference/sql-functions/numeric-functions/log2.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Calculate base-2 logarithm. This function returns the logarithm of a number to the base 2.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/xRXOT0S7dgZ14TQloyjR" %}
[MOD](/docs/server/reference/sql-functions/numeric-functions/mod.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Calculate modulo. This function returns the remainder of a number divided by another number.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/BVRf0QIH5watRJDPTPP7" %}
[OCT](/docs/server/reference/sql-functions/numeric-functions/oct.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Convert to octal. This function returns the octal string representation of a numeric argument.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/lkZqlni8tDfA3itdMb6u" %}
[PI](/docs/server/reference/sql-functions/numeric-functions/pi.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Return the value of pi. This function returns the mathematical constant π (approximately 3.141593).
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/d6vs6DZmP5uZzEfQNAmt" %}
[POW](/docs/server/reference/sql-functions/numeric-functions/pow.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Synonym for POWER(). Returns the value of a number raised to the power of another number.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/08Rxj6LYiIfStjqbnBRa" %}
[POWER](/docs/server/reference/sql-functions/numeric-functions/power.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Calculate power. This function returns the value of a number raised to the specified exponent.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/tstwKcvp7KmEFNsxJPnu" %}
[RADIANS](/docs/server/reference/sql-functions/numeric-functions/radians.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Convert degrees to radians. This function transforms an angle measured in degrees to its equivalent in radians.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/u6SKyzIwEvbC9RmAhHDj" %}
[RAND](/docs/server/reference/sql-functions/numeric-functions/rand.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Generate a random number. This function returns a random floating-point value between 0 and 1.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/rRda8oCbRHrHf61j6uCh" %}
[ROUND](/docs/server/reference/sql-functions/numeric-functions/round.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Round a number. This function rounds a number to a specified number of decimal places.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/ONXPdAMFLyswsAZstvdE" %}
[SIGN](/docs/server/reference/sql-functions/numeric-functions/sign.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Return the sign of a number. This function returns -1, 0, or 1 depending on whether the argument is negative, zero, or positive.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/auhD7z49f91cBrAysVA2" %}
[SIN](/docs/server/reference/sql-functions/numeric-functions/sin.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Calculate sine. This function returns the sine of an angle given in radians.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/qB5if1HHj7wkqQ1f321u" %}
[SQRT](/docs/server/reference/sql-functions/numeric-functions/sqrt.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Calculate square root. This function returns the non-negative square root of a number.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/MYwewv34qIvlT7KiYlE4" %}
[TAN](/docs/server/reference/sql-functions/numeric-functions/tan.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Calculate tangent. This function returns the tangent of an angle given in radians.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/iUcuDwFELXPFBofq74kk" %}
[TO\_NUMBER](/docs/server/reference/sql-functions/numeric-functions/to_number.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Convert a string to a number. This Oracle-compatible function parses a string using a specified format and returns a numeric value.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/rcl6p24Dk5OxU7kNHSIt" %}
[TRUNCATE](/docs/server/reference/sql-functions/numeric-functions/truncate.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Truncate a number. This function truncates a number to a specified number of decimal places.
{% endcolumn %}
{% endcolumns %}
