What is an Equation?
Equation fields work by combining field values, numbers, and other mathematical functions to create an equation that will be calculated for each record. They are a type of a field on an object within your Data section in the Builder.
There are two equation types available: Number and Date.
Numeric Equation example: (Sales  Expenses) * 12
Date Equation example: Date Completed  Date Started
What does an equation look like in a live app?
Where do I access equations?
Equations are accessed from the "Data" section in the Builder, in the left column, by selecting the object where you want the equation to be placed.
Manage Equations
Add an Equation
From the "Data" section in the Builder, select the object you want to add your field to from the left menu. Hover over the Number name / icon at the top and choose "Equation". Add your field name and click "Add Field".
Edit an Equation
From the "Data" section in the Builder, select the object where you want to edit your equation. To edit, click on the gear icon on the field.
Delete an Equation
From the "Data" section in the Builder, select the object where you want to delete your equation. To delete, click on the trash can icon on the field.
Warning: Deleting a field is destructive and will cause all of its values to be removed, so confirm this is the correct action in your app before proceeding.
Build an Equation
Equations can take many different forms. See the Equation Types section for details on these options.
To build to your equation:
 Click in the text formula input box and use the dropdown list to select your desired field,
 Type numbers or mathematical operators (eg. * / + ) directly into the input box, or
 Type field names directly into the input box.
Above the equation editor, the Example Output shows you an example output of the current formula:
Access Connected Fields
As with text formulas, equations give you the option of retrieving data from connected records. If you start typing the name of a field on a connected object, you'll see it appear among the suggestions with the format of Field connected with Object > Connected Object.
Use Multiple Choice Fields in Equations
Multiple choice fields can be used in equations. These values convert to numbers that will be used in the equation. Any nonnumeric characters are stripped and the remaining number will be used. If no number is left then zero will be used.
Use Yes / No Fields in Equations
Yes / No fields can be used in equations. These values convert to numbers that will be used in the equation: No = 0, Yes = 1.
Using Equations on Live App Forms
Requirements

All fields used in the equation need to be present in the form.
(Similarly, if you're setting a value in a record rule from a formula field, that field must be present on the form as well.) 
The equation must be a Numeric equation (not a Date Type).

The equation can not use other formulas (sum, count, etc.)
Equation fields can be added to forms to simulate realtime calculators. Here's what a simple example looks like:
Note: Currently equation fields cannot be used to validate form submits.
Order of Operations
If your equation field depends on other formulas or fields with conditional rules, you must list it after these fields since Knack processes those in order that they’re listed in the Object. Another way to say this is that if an equation depends on a field, field with a conditional rule, or another equation, those fields must be listed above the equation that uses it.
Equation Types: Settings and Functions
Numeric Equations
Numeric equations can calculate field values, numbers, and other mathematical functions and format results in various number formats with decimals, rounding, currency, etc. Activate a numeric equation by setting the "Equation Type" option to Numeric.
Numeric Equation Settings
Many settings exist for numeric equations. See full list of numeric equations settings here.
Numeric Equation Functions
Many regular math functions (such as "ceil" or "max") can be used in Knack numeric equations. Others, like "getDateDayOfMonth" provide numeric values for a date. Read more here.
Date Equations
Date equations can calculate dates and format results as hours, days, weeks, etc. Activate a date equation by setting the "Equation Type" option to Date.
Note: Blank date values, when used in an equation, are treated as 1/1/1970, the timestamp used as Knack's "start" date for date values.
Date Equation Settings
Many options exist for date equations. See full list of date equations settings here.
Date Equation Functions
currentTime(): Returns the current Date and Time according to your App's Timezone settings.
Detailed Equation Examples
Conditional Equations
Your equation can accept conditional rules using the ternary operator. A ternary operation allows three operands and can be used as a shortcut for the if statement. An example:
Condition ? Equation_1 : Equation_2
This means if your condition is true, Knack will use the equation or value followed by the ? symbol. If your condition is false, Knack will use the second equation or value followed by the : symbol.
Note that you can nest ternary statements to have more than two conditions/results like so:
Condition A ? Result 1 : (Condition B ? Result 2 : Result 3)
Also, you can use an & symbol to represent AND and a  symbol to represent OR in an equation like so:
Condition A > 0 & Condition B > 10 ? Equation 1 : Equation 2
Conditional Example 1
There may be times where you need to track total elapsed time. This could can easily be done using the currentTime() function  but what happens when your date field is blank? A blank date would be interpreted as 0, which Knack would interpret as January 1, 1969, resulting in a very large negative number. Using a conditional rule we can make sure our equation remains 0 instead:
{Invoice Date} > 0 ? {Invoice Date}  currentTime() : 0
Conditional Example 2
This example shows how to apply an additional 3% late fee to a charge:
{Time of Payment} > {Due Date} ? {Cost} * 1.03 : {Cost}
Conditional Example 3
To trigger an equation when values are equal you can use the == operator:
{Budget Period} == 1 ? {Q1 Date} : {Budget Period}==2 ? {Q2 Date} : 0
Conditional Example 4
This complex example uses the following logic:
If Time of Payment is later than Due Date, charge an extra 3%
If Time of Payment is earlier than Due Date, charge 1% less
Otherwise (if Time of Payment equals Due Date), charge the normal amount
{Time of Payment} > {Due Date} ? ({Cost} 1.03) : ({Time of Payment} < {Due Date} ? {Cost 0.99} : {Cost})
Conditional Example 5
This complex example uses the following logic:
If Start Date is blank, then nothing should be calculated
If End Date is blank, then calculate the difference between the current date and the Start Date
If Start Date and End Date are both populated, then calculate the difference between the End Date and the Start Date
Otherwise (if they're both blank), set the value to zero
{End Date} > 0 & {Start Date} > 0 ? {End Date}  {Start Date} : {Start Date} > 0 ? currentTime()  {Start Date} : 0
Conditional equations with text fields
Conditional rules don’t currently work with text fields, but you can map your text fields to number fields and use the number fields to in your equation. Assuming you already have a short text field called Text:

Add a number field (we’ll call it Num)

Add a conditional rule to the Num for each option you want to account for Text; e.g. set Num to 1 if Text is First Choice, set Num to 2 if Text is Second Choice, etc.

Run a batch update on your data (even on a new temporary field) to populate the Num field via its conditional rules

Use Num in place of Text in your equations
Use Equations in Your App
Builder: Equations or Text Formula fields
Just as in any other field on an object connected to another object, equations fields can be used in text formulas or in other equation fields.
Builder: Data > Records
Equation values will display in the "Records" tab in an object in your builder. Here you can view and reference these values, as well as using record filters to display particular values for this equation field.
Builder: Pages > Views
Equation fields can be inserted on to most page views, to then display the value on your Live App.
Builder: Live App Form Calculations
Equation fields can be added to forms to simulate realtime calculators.
Requirements

All fields used in the equation need to be present in the form as well.

The equation can not be a Date Type equation.

The equation can not use other formulas (sum, count, etc.). Other equation fields and Yes/No fields can be used in equations on a Live App form calculation, provided they follow the other requirements above.
Here's what a simple example looks like:
How To Guides