KiSSFLOW supports most Excel functions and formula. The formula allows users to perform operations such as multiplication, addition, subtraction and division on data entered in the form, while functions allow users to use pre-defined formula that performs calculations by using specific values passed as arguments.

### Using formula in forms

Formula can be written on number fields to perform mathematical operations such as multiplication, addition, subtraction and division.

For example, if the form contains the number fields

**Travel_Expense****Stay_Expense****Misc_Expense**

Then the total expense can be calculated by writing the formula

`Travel_Expense+Stay_Expense+Misc_Expense`

in a field called **Total_Amount**.

### Calculating Dates

Just as in Excel, the dates are stored as integers and the times are stored as decimal values. Therefore, to compute the difference between two dates and times, you can simply subtract these values in the same way you would subtract two numbers. For example, if **Leave_Start_Date** and **Leave_End_Date** are fields in the leave request form, then the number of days leave requested can be calculated by writing the formula:

`Leave_End_Date-Leave_Start_Date+1`