# Sample Formulas - Analytics

### Calculate the time needed to burn down the backlog

Assuming your team can accomplish 10 story points a week, this will tell us how long (in weeks) it will take to burn down work and get to certain items further down the backlog. To adjust how many story points the team can work in a week, simply change the "velocity" value.

```
WITH velocity = 10:
CONCAT(SUM#preceding{story_points} / velocity, "w")
```

For this example to work most effectively, the structure should be sorted based on how you choose which work to complete first. See Sort Generatorsfor more information.

### Calculate days past due

This example checks for items that are overdue and returns the number of days the item is overdue.

```
IF dueDate < NOW():
DAYS_BETWEEN(dueDate, NOW()) CONCAT " days late"
```

### Compare the original estimate to work logged and the remaining estimate

```
IF originalEstimate:
(timeSpent + remainingEstimate) / originalEstimate
ELSE:
"not estimated"
```

### Calculate the interquartile range of story point estimates

```
WITH points = ARRAY { storyPoints } : // Holds all the story points of the children.
QUARTILE(points, 3) - QUARTILE(points, 1)
```