# Calculate average days

**URL:** <https://forum.adalo.com/t/calculate-average-days/35612>\
**Category:** Database\
**Created:** [January 24, 2023, 12:26pm UTC](https://forum.adalo.com/t/calculate-average-days/35612 "2023-01-24T12:26:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eccles](https://avatars.discourse-cdn.com/v4/letter/e/9e8a1a/32.png) [@Eccles](https://forum.adalo.com/u/Eccles)\
**Post date:** [January 24, 2023, 12:26pm UTC](https://forum.adalo.com/t/calculate-average-days/35612/1 "2023-01-24T12:26:12Z")

</div>

Example: If you have a sales app. And you want to calculate the average number of days from the orders is created to the orders are sent out/finished. Each order have a Created date and a completed date.

Is there any smart way to calculate the average number of days from created to completed of all orders?

---

<div class="post-metadata">

**Author:** ![Benalihoussam](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/benalihoussam/32/10346_2.png) [@Benalihoussam](https://forum.adalo.com/u/Benalihoussam)\
**Post date:** [January 24, 2023, 5:52pm UTC](https://forum.adalo.com/t/calculate-average-days/35612/2 "2023-01-24T17:52:50Z")

</div>

hi,

- add a new number property to your sales collection, call it “# of days”
- when you close a sale make it update the sale "# of days= current date - start date (don’t worry adalo will convert the difference into days)
- to see the average: add a text component (magic text\> scroll to your sales collection\> “# of days” should show up automatically\>hover over it and select “average”  
done
