## Creating custom formulas for KPI calculations

FYTT allows you to define custom formulas that determine how KPI results should be calculated. Whenever athlete data is recorded for the KPI, their input will be used in the formula to determine the calculated value.

To add a custom formula to a KPI, click the "Custom formula" option on the KPI form:

With this option selected, the KPI form now has a field for defining your formula. This is not a free-form text field; it has special functionality that will be discussed later.

**FORMULA INPUTS**

Formula inputs are limited to numbers, equation operators, and the exercise attributes listed on the KPI form (calories, heart rate, distance, etc.). All the attributes (except the one selected as the "Measurement type") are fixed values that can be referenced in the formula. To set the value for an attribute, check the box for the attribute and input the desired value.

The attribute specified in the measurement type selection is variable based on athlete input at the time of assessment. You can still reference this attribute in the formula, but a placeholder of 10 is used to test and validate your equation.

For example, if we wanted to write the Epley equation to calculate an estimated 1 rep max based on a 3 rep maximal effort, we would use the following inputs:

With these attributes selected, our formula for the Epley equation would like this:

See the formula field guide to learn more about building custom formulas.