# Need to calculate the average amount of days it takes to complete a specific task

Options

Hello,

I am working on trying to figure out the correct formula to use to find the average amount of days it takes to complete a specific task.

I have multiple types of tasks on my sheet and created an automation that stamps the date it was completed. I need to now find a formula that will sort the average amount of time for each of my tasks separately.

Any help would be very much appreciated.

• ✭✭✭✭✭✭
Options

Hi @JGrison,

1. Add a new column to your sheet, let's name it "Duration".
2. In this column, for each task, you will calculate the difference between the start date and the completion date. Assuming your start date is in column A and your completion date is in column B, the formula for each row in the Duration column (let's say this is column C) would look like:
```Duration@row==[End Date]@row - [Start Date]@row
```

```=AVG(COLLECT(Duration:Duration, [Task Type]:[Task Type], "A", Completed:Completed, "completed"))