ES|QL mathematical functions
Elastic Cloud Serverless projects are autoscaled environments, fully managed by Elastic and available on Elastic Cloud. Availability This functionality is generally available and ready for production usage. Serverless interfaces and procedures might differ from classic Elastic Stack deployments. The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats. Availability This functionality is generally available and ready for production usage. Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments. This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.
Serverless
Generally available
Stack
Generally available
ES|QL supports these mathematical functions:
ABSReturns the absolute value of a number.
ACOSReturns the arccosine of a number.
ACOSHReturns the inverse hyperbolic cosine of a number.
ASINReturns the arcsine of a number.
ASINHReturns the inverse hyperbolic sine of a number.
ATANReturns the arctangent of a number.
ATAN2Returns the two-argument arctangent of y and x coordinates.
ATANHReturns the inverse hyperbolic tangent of a number.
CBRTReturns the cube root of a number.
CEILRounds a number up to the nearest integer.
COPY_SIGNThe Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats. Availability Generally available since 9.1 This functionality is generally available and ready for production usage. Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments. This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.Combines the magnitude of one number with the sign of another.
COSReturns the cosine of an angle.
COSHReturns the hyperbolic cosine of a number.
EReturns the mathematical constant e.
EXPReturns the value of e raised to the power of the given number.
FLOORRounds a number down to the nearest integer.
HYPOTReturns the hypotenuse of two numbers.
LOGReturns the logarithm of a value to a base.
LOG10Returns the base-10 logarithm of a number.
PIReturns the mathematical constant pi.
POWReturns a value raised to the power of an exponent.
ROUNDRounds a number to the specified number of decimal places.
ROUND_TOThe Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats. Availability Preview since 9.1 This functionality is in technical preview and is ready for evaluation. Use with caution in production; it is not recommended for mission-critical workloads. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. Specific Support terms apply. Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments. This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes. Elastic Cloud Serverless projects are autoscaled environments, fully managed by Elastic and available on Elastic Cloud. Availability Preview This functionality is in technical preview and is ready for evaluation. Use with caution in production; it is not recommended for mission-critical workloads. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. Specific Support terms apply. Serverless interfaces and procedures might differ from classic Elastic Stack deployments.Rounds down to one of a list of fixed points.
SCALBThe Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats. Availability Generally available since 9.1 This functionality is generally available and ready for production usage. Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments. This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.Returns the result of multiplying a number by 2 raised to a scale factor.
SIGNUMReturns the sign of the given number.
SINReturns the sine of an angle.
SINHReturns the hyperbolic sine of a number.
SQRTReturns the square root of a number.
TANReturns the tangent of an angle.
TANHReturns the hyperbolic tangent of a number.
TAUReturns the mathematical constant tau.