Mathematical Functions and Operators
Data 360 Query Guide, mirrored from developer.salesforce.com: **Applies to:** ✅ Data 360 SQL ✅ Tableau Hyper API
markdownreferencev1APC4-TWKDguide: data-cloud-query-guidestage: referencetrust: officialsource: developer.salesforce.comservice: data360interface: sqlMathematical Functions and OperatorsData 360Data CloudData 360 Query Guide
Mirror of <https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/math-func.html> (Salesforce, Data 360 Query Guide), read 2026-10-23. Salesforce's own page is the authority; this copy exists because that site refuses non-browser readers.
Mathematical Functions and Operators
Applies to: ✅ Data 360 SQL ✅ Tableau Hyper API
Functions and operators for performing numeric calculations. Use mathematical functions to:
- Perform arithmetic with operators for addition, subtraction, multiplication, division, and more.
- Round and truncate values to integers or a set number of decimal places.
- Compute powers, roots, and logarithms for exponential and scaling calculations.
- Convert angles and compute trigonometric values for geometric calculations.
- Except where noted, a function returns the same data type as its argument or returns an error in case of failure.
- Many functions are provided in multiple forms with different argument types.
- Bitwise operators work only on integral data types. The other operators are available for all numeric data types.
For more information about supported types, see Numeric Types.
Perform arithmetic and bitwise operations:
- Mathematical Operators — Arithmetic and bitwise operators such as
+,-,*,/,%, and^.
Round or truncate numeric values:
- CEIL / CEILING — Round up to the nearest integer.
- FLOOR — Round down to the nearest integer.
- ROUND — Round to the nearest integer or to a number of decimal places.
- TRUNC — Truncate toward zero.
Compute exponential and scaling values:
- CBRT — Cube root.
- EXP — Raise
eto a power. - LN — Natural logarithm.
- LOG — Base 10 logarithm or logarithm to a specified base.
- POWER — Raise a number to a power.
- SQRT — Square root.
Perform division, sign, and value operations:
- ABS — Absolute value.
- DIV — Integer quotient of two numbers.
- MOD — Remainder of a division.
- SIGN — Sign of a number.
- WIDTH_BUCKET — Assign a value to a histogram bucket.
Generate constants and pseudorandom numbers:
Convert angles and compute trigonometric values:
- DEGREES — Convert radians to degrees.
- RADIANS — Convert degrees to radians.
- Trigonometric Functions — Sine, cosine, tangent, and their inverses.