Skip to content

ESCalc Lite supports a subset of the full NCalc syntax.

Literals

NameExample
Numeric1.23e2
Booleanfalse | true
String'string' | "string"
Date#12/12/1995#

Operators

OperatorDescription
+Addition
-Subtraction
*Multiplication
**Exponentiation
/Division
%Modulus (remainder)
>Greater than
<Less than
>=Greater than or equal to
<=Less than or equal to
==Equality comparison
=Equality comparison
!=Not equal
<>Not equal
!Logical NOT
&&Logical AND
||Logical OR
&Bitwise AND
|Bitwise OR
^Bitwise XOR
>>Bitwise right shift
<<Bitwise left shift
~Bitwise NOT
?Ternary conditional operator
inChecks if value is in list
notLogical NOT
not inChecks if value is not in list

Builtin functions

NameDescription
AbsReturns the absolute value of a number.
AcosReturns the arccosine (in radians) of a number.
AsinReturns the arcsine (in radians) of a number.
AtanReturns the arctangent (in radians) of a number.
CeilingRounds a number up to the nearest integer.
CosReturns the cosine of a number (in radians).
ExpReturns e raised to the power of a number.
FloorRounds a number down to the nearest integer.
IEEERemainderReturns the remainder according to IEEE 754 rules.
LnReturns the natural logarithm (base e) of a number.
LogReturns the logarithm of a number with optional custom base. Defaults to natural log if base not provided.
Log10Returns the base-10 logarithm of a number.
MaxReturns the larger of two numbers.
MinReturns the smaller of two numbers.
PowRaises a number to the power of another.
RoundRounds a number to the nearest integer or to a specified number of decimal places.
SignReturns the sign of a number (-1, 0, or 1).
SinReturns the sine of a number (in radians).
SqrtReturns the square root of a number.
TanReturns the tangent of a number (in radians).
TruncateTruncates a number by removing its fractional part.
ifEvaluates and returns one of two values based on a boolean condition.
ifsEvaluates multiple conditions and returns the result of the first true condition; returns a default if none match.