# Models Formula Reference

Here's a list of helpful commonly used pre-built functions to use in the formula section.

## Arithmetic

## Rounding

**Round** - rounds to the nearest whole number.

**Round Up** - rounds up to the nearest whole number. CEIL is another name for this function.

**Round Down** - rounds down to the nearest whole number. FLOOR is another name for this function.

## If / Then / Else

This formula is useful if you want to set a condition and have 2 results: one if the result is true and the second if the result is false.

Format is CONDITION ? RESULT_IF_TRUE : RESULT_IF_FALSE

## Ranges and aggregates

**Ranges** - Specify two arguments inside the brackets.

This example produces a list of all values of "Test Formula" between the cell's month and 5 months before (inclusive). In order to do math with the results, you must use a helper function to turn the list into a single value. The dates used for ranges are relative to each cell, so they can't be used to compute running totals over all time. For that, use a running total formula like:

**Sum** - Returns the sum of a list of values.

**Average** - Returns the average (mean) of a list of values.

**Min** - Returns the smallest of a list of values.

**Max** - Returns the largest of a list of values.

## Date Functions

**Quarterly** - Returns a value only on the first month of each quarter, otherwise returns zero. Passing 2 or 3 as the second argument will cause it to return a value only on the 2nd/3rd month of each quarter.

**Month number** - Returns the month for the referenced column as a number between 1 and 12

**Days in month** - Returns the number of days in the month of the referenced column.

## Hiring Plan Functions

**Employee Count** - The employee count for active employees on the hiring plan. Can reference the total or narrow down by department or role.

**New Hires** - The number of new hires on the hiring plan in a given month. Can reference the total or narrow down by department or role.

**Total Base Salary** - The sum of all employees' salary on the hiring plan. Can reference the total or narrow down by department or role.

For contractors, you can use similar hiring plan functions.

**Contractor Count** - The contractor count for active contractors on the hiring plan. Can reference the total or narrow down by department or role.

**Contractor New hires** - The number of contractor new hires on the hiring plan in a given month. Can reference the total or narrow down by department or role.

**Contractors(department/role)** - Also known as total contractor costs: the sum of all contractors on the hiring plan. Can reference by department or role.

## Financial Report Functions

**Account Balance** - References the account balance amounts from your chart of accounts. You can reference the account balance of any category in the past(actuals) or future(budgets).

For past months, use x - (n) to reference a number of previous months.

For future months, use x + (n) to reference a number of future months.