Supported Functions in the Computation Builder
Last updated: November 17, 2026
This article lists every function available in the Computation Builder, grouped by what they do, with the data types each one works with and an example for each.
1. Understanding data types
Every variable in your contract has a Data Type, and most functions work best when the values you give them match.
Number: standard integers or decimals (10, 500, 2.5)
Currency: a monetary value with a currency code attached ($100.00 USD, €50 EUR)
Duration: a span of time (30 Days, 12 Months)
Date: a specific calendar date (2024-01-01)
Text box: text-based information ("MSA", "Active")
Boolean: a true/false result
Table: a set of rows, each with its own columns, such as the line items on an order form
Building a Currency value
Use Currency to create a currency amount directly inside a formula.
Syntax:
Currency(amount, currencyCode)Example:
Currency(100, "USD")creates a value of 100 USD.
Building a Duration value
Use Duration to create a span of time directly inside a formula.
Syntax:
Duration(value, unit), where unit is Days, Weeks, Months, or YearsExample:
Duration(30, "DAYS"),Duration(3, "MONTHS"),Duration(1, "YEARS")Good to know: a Week, Month, or Year is compared in days behind the scenes (a Month counts as 30 days, a Year as 365), so
Duration(1, "MONTHS")andDuration(30, "DAYS")behave the same way when compared, even though they display differently.
2. Arithmetic functions
Add
Totals two or more values, like adding up several fees, or every value in a column of a line-items table.
Syntax:
Add(value1, value2, …), orAdd(GetColumn(table, "column"))to total a whole columnWorks with: Number with Number, Currency with Currency (same currency code), Duration with Duration, Date with Duration (moves a date forward, e.g. Start Date + 30 Days = End Date)
Incompatible: Currency with Duration, Date with Number
Example:
Add(5, 3)→ 8.Add(Currency(100, "USD"), Currency(50, "USD"))→ Currency(150, "USD").Add("2024-01-01", Duration(7, "DAYS"))→ "2024-01-08"
Subtract
Finds a difference, a remaining balance, or an earlier date.
Syntax:
Subtract(left, right)Works with: Number from Number, Currency from Currency (same currency code), Duration from a Date (moves it backward, e.g. Expiration Date - 30 Days = Notice Date), a Date from a Date (returns a Duration: the time between the two)
Incompatible: Currency from a Number
Example:
Subtract(10, 3)→ 7.Subtract("2024-03-08", "2024-03-01")→ Duration(7, Days)
Multiply
Scales a value, such as a total cost based on quantity.
Syntax:
Multiply(value1, value2, …), orMultiply(GetColumn(table, "column"))to multiply every value in a columnWorks with: Currency with a Number (e.g. Monthly Fee × 12), Duration with a Number (e.g. 1 Week × 4), Number with Number
Incompatible: Currency with Currency, Date with a Number
Example:
Multiply(Currency(100, "USD"), 3)→ Currency(300, "USD")
Divide
Splits a cost, finds an average, or works out a ratio.
Syntax:
Divide(dividend, divisor)Works with: Currency by a Number (e.g. Total Fee ÷ 4 Installments, returns Currency), Duration by Duration (returns a Number)
Incompatible: a Number by Currency, dividing anything involving a Date, and dividing by 0
Example:
Divide(10, 2)→ 5. Dividing two Currency values returns another Currency rather than a plain Number, which matters if you're calculating a percentage:Multiply(Divide(GetCurrencyValue(PriceA), GetCurrencyValue(PriceB)), 100)pulls the plain numbers out first withGetCurrencyValue()(below) so the result is a Number you can store in a Number field.
Abs
Returns the positive version of a value, dropping any minus sign.
Syntax:
Abs(value)Works with: Number, Currency, Duration
Example:
Abs(-500)→ 500
Ceil
Rounds up to the next whole number.
Syntax:
Ceil(value)Works with: Number, Currency, Duration
Example:
Ceil(4.1)→ 5
Floor
Rounds down to the previous whole number.
Syntax:
Floor(value)Works with: Number, Currency, Duration
Example:
Floor(4.9)→ 4
Round
Rounds to a set number of decimal places.
Syntax:
Round(value)orRound(value, precision)Works with: Number, Currency, Duration
Example:
Round(4.5)→ 5.Round(3.14159, 2)→ 3.14Good to know: leave the second number out and SpotDraft rounds to a whole number.
Mod
Returns the remainder after dividing one value by another. Handy for anything that repeats on a cycle.
Syntax:
Mod(value, divisor)Works with: value can be Number, Currency, or Duration; the divisor needs to be a plain Number
Example:
Mod(10, 3)→ 1
3. Comparison functions
These always return a true or false result.
Greater than
Checks if one value is bigger than another.
Syntax:
GreaterThan(left, right)Works with: Number, Currency, Duration, Date, as long as both sides are the same type
Example:
GreaterThan(DealValue, Currency(50000, "USD"))is true once the deal is over $50,000.
Less than
Checks if one value is smaller than another.
Syntax:
LessThan(left, right)Works with: Number, Currency, Duration, Date
Example:
LessThan(TermLength, Duration(365, "DAYS"))is true if the term is under a year.
Greater than or equal to
Checks if one value is bigger than or the same as another.
Syntax:
GreaterThanOrEqual(left, right)Works with: Number, Currency, Duration, Date
Example:
GreaterThanOrEqual(NumberOfSeats, 200)is true at exactly 200 seats or above.
Less than or equal to
Checks if one value is smaller than or the same as another.
Syntax:
LessThanOrEqual(left, right)Works with: Number, Currency, Duration, Date
Example:
LessThanOrEqual(NumberOfSeats, 200)is true at 200 seats or below.
Equals
Checks if two values match.
Syntax:
Equals(value1, value2)Works with: Number, Text, Boolean, Currency, Duration, Date, and dropdown fields
Example:
Equals(Region, "North America")
Not
Flips a true/false result to its opposite.
Syntax:
Not(condition)Example:
Not(Equals(Status, "Active"))is true for anything other than "Active".
And
True only when every condition it's given is true.
Syntax:
And(condition1, condition2, …)Example:
And(GreaterThan(DealValue, Currency(50000, "USD")), Equals(Region, "US"))is true only when both hold.
Or
True when at least one condition it's given is true.
Syntax:
Or(condition1, condition2, …)Example:
Or(Equals(Region, "US"), Equals(Region, "EU"))is true if either matches.
4. Handling conditions and missing data
If
Checks a condition and returns one of two results.
Syntax:
If(condition, result_if_true, result_if_false)Example:
If(Equals(ContractType, "NDA"), "Legal Ops", "Legal Counsel")routes NDAs to Legal Ops for approval, and every other contract type to Legal Counsel.Tip: for more than two outcomes, nest
If()insideIf(), or useSwitch()below, which reads more clearly once you're past two or three branches.
Exists
Checks whether a field has actually been filled in, as opposed to being blank or never shown.
Syntax:
Exists(variable)Example:
If(Exists(Discount), Multiply(Price, Subtract(1, Discount)), Price)applies a discount if one was entered, and uses the full price otherwise.Good to know: a value of 0, "false", or a blank piece of text still counts as entered, since it was genuinely answered. Only a field that was never filled in at all counts as not existing. Some older formulas use a function called
IfExistsfor this same purpose; new formulas should useExiststogether withIfinstead.
Switch
Checks a variable against a list of possible values, like several If statements chained together.
Syntax:
Switch(variable, case1, result1, case2, result2, …, fallback)Example:
Switch(PlanType, "Standard", "1 Year", "Growth", "2 Years", "3 Years"). Standard returns 1 Year, Growth returns 2 Years, and any other plan (Enterprise, for instance) returns 3 Years.Good to know: that last, unpaired value catches anything that doesn't match a listed case. Leave it out only if you're certain every possible value is covered, since an unmatched value otherwise causes an error.
5. Text functions
Useful when a computation needs to build or check a piece of text, for instance assembling a label or validating a format.
Concat
Joins several pieces of text together.
Syntax:
Concat(value1, value2, …)Example:
Concat("This Agreement is governed by the laws of ", Jurisdiction, ", which shall have exclusive jurisdiction to resolve any disputes arising from it.")builds a governing law clause like "This Agreement is governed by the laws of Delaware, which shall have exclusive jurisdiction to resolve any disputes arising from it."
Contains
Checks whether a piece of text, or a multi-select field, includes a value.
Syntax:
Contains(container, searchValue)Example:
Contains(SelectedAddOns, "Priority Support")is true if that add-on is selected. Works on a table column too, see Working with table fields below.
LowerCase
Converts text to all lowercase.
Syntax:
LowerCase(text)Example:
LowerCase("ACME INC")→ "acme inc"
UpperCase
Converts text to all uppercase.
Syntax:
UpperCase(text)Example:
UpperCase("acme inc")→ "ACME INC"
Strip
Removes extra spaces from the start and end of a piece of text, useful for cleaning up a free-text entry before comparing or displaying it.
Syntax:
Strip(text)Example:
Strip(CompanyName)turns " Acme Inc. " into "Acme Inc."
Replace
Swaps every occurrence of one piece of text for another. This is case-sensitive.
Syntax:
Replace(text, find, replaceWith)Example:
Replace(ContractReference, "-", "_")turns "MSA-2024" into "MSA_2024".
Slice
Pulls out part of a piece of text.
Syntax:
Slice(text, start, length), counting the first character as position 1Example:
Slice("Hello World", 7, 5)→ "World"
6. Working with currency and duration fields
A Currency field carries both a number and a currency code; a Duration field carries both a number and a unit. These functions let you read or swap out either part.
GetCurrencyValue
Pulls just the plain number out of a Currency field.
Syntax:
GetCurrencyValue(currencyField)Example:
GetCurrencyValue(ContractValue)→ 50000
GetCurrencyUnit
Pulls just the currency code out of a Currency field.
Syntax:
GetCurrencyUnit(currencyField)Example:
GetCurrencyUnit(ContractValue)→ "USD"
UpdateCurrencyValue
Returns a new Currency with the amount changed, keeping the same currency code.
Syntax:
UpdateCurrencyValue(currencyField, newAmount)Example:
UpdateCurrencyValue(Price, 0)keeps the currency code but zeroes out the amount.
UpdateCurrencyUnit
Returns a new Currency with the currency code changed, keeping the same amount.
Syntax:
UpdateCurrencyUnit(currencyField, newCode)Example:
UpdateCurrencyUnit(Price, "EUR")keeps the amount but switches it to EUR.
GetDurationValue
Pulls just the number out of a Duration field, in whatever unit it's stored in.
Syntax:
GetDurationValue(durationField)Example: for a field set to 2 Weeks,
GetDurationValuereturns 2.
GetDurationUnit
Pulls just the unit out of a Duration field.
Syntax:
GetDurationUnit(durationField)Example: for a field set to 2 Weeks,
GetDurationUnitreturns "WEEKS".
GetDurationInDays
Converts a Duration field to a day count, regardless of what unit it's stored in.
Syntax:
GetDurationInDays(durationField)Example: for a field set to 2 Weeks,
GetDurationInDaysreturns 14.Good to know: this is the one to reach for when comparing two Duration fields that might be stored in different units, one in Months and one in Days, since it puts both on the same scale first.
UpdateDurationValue
Returns a new Duration with the number changed, keeping the same unit.
Syntax:
UpdateDurationValue(durationField, newValue)Example:
UpdateDurationValue(ContractTerm, 24)keeps the same unit but updates the count to 24.
UpdateDurationUnit
Returns a new Duration with the unit changed, keeping the same number.
Syntax:
UpdateDurationUnit(durationField, newUnit)Example:
UpdateDurationUnit(ContractTerm, "MONTHS")keeps the same number but reinterprets it in months.
7. Working with table fields
An order form or template often collects a table of line items, products, fees, milestones, rather than a single value. These functions work on that table.
GetColumn
Pulls one column out of a table as a list of values, which you can then total, multiply, or search.
Syntax:
GetColumn(table, "columnName")Example:
Add(GetColumn(LineItems, "amount"))totals the "amount" column across every row, for instance to get an order form's subtotal.Contains(GetColumn(LineItems, "product"), "Priority Support")checks whether any row is for that product.
Filter
Returns only the rows of a table that match a condition, without changing the original table. Inside the condition, refer to the current row's value with column.<columnName>.
Syntax:
Filter(table, condition)Example:
Filter(LineItems, Equals(column.category, "SaaS"))keeps only the SaaS line items. Combine it withGetColumnto total just those rows:Add(GetColumn(Filter(LineItems, Equals(column.category, "SaaS")), "amount"))
SortBy
Returns a table sorted by a column, without changing the original table. Useful for making sure line items display in a consistent order on the generated contract.
Syntax:
SortBy(table, "columnName")for ascending order, orSortBy(table, "columnName", "desc")for descendingExample:
SortBy(LineItems, "product")sorts alphabetically A to Z.SortBy(LineItems, "amount", "desc")sorts from highest amount to lowest.
8. Quick reference: valid operations
Operation | Number | Currency | Duration | Date |
|---|---|---|---|---|
Add | ✅ Number + Number | ✅ Currency + Currency (same code) | ✅ Duration + Duration | ✅ Date + Duration |
Subtract | ✅ Number - Number | ✅ Currency - Currency (same code) | ✅ Duration - Duration | ✅ Date - Duration, Date - Date |
Multiply | ✅ Number × Number | ✅ Currency × Number | ✅ Duration × Number | ❌ Incompatible |
Divide | ✅ Number ÷ Number | ✅ Currency ÷ Number, Currency ÷ Currency (returns Currency) | ✅ Duration ÷ Duration (returns Number) | ❌ Incompatible |
Best practices
Currency and Duration don't combine directly. Adding Currency to Duration (e.g. $500 + 30 Days) needs matching units first.
Currency multiplies with a Number, not another Currency. $10 × 5 units works; $10 × $5 doesn't.
Dates add with a Duration, not with each other. You can't add two dates together, but you can add a Duration to a Date to project a future timeline.
Dividing two Currency values returns a Currency. If you need a plain percentage or ratio out, pull the numbers out first with
GetCurrencyValue().Match units before comparing two durations. If one field might be in Months and another in Days, convert both with
GetDurationInDays()first.