# Calculate Average age (days) of known critical vulnerabilities

**URL:** <https://discuss.rapid7.com/t/calculate-average-age-days-of-known-critical-vulnerabilities/23725>\
**Category:** InsightVM\
**Tags:** InsightVM\
**Created:** [June 2, 2023, 1:36pm UTC](https://discuss.rapid7.com/t/calculate-average-age-days-of-known-critical-vulnerabilities/23725 "2023-06-02T13:36:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kumar](https://discuss.rapid7.com/letter_avatar_proxy/v4/letter/k/9f8e36/32.png) [@Kumar](https://discuss.rapid7.com/u/Kumar)\
**Post date:** [June 2, 2023, 1:36pm UTC](https://discuss.rapid7.com/t/calculate-average-age-days-of-known-critical-vulnerabilities/23725/1 "2023-06-02T13:36:19Z")

</div>

Hello,

Is there a way that I can calculate the ​Average age (days) of known critical vulnerabilities within environment. Is there any SQL query or Dashboard card that can provide the information?

Regards,

---

<div class="post-metadata">

**Author:** ![Kumar](https://discuss.rapid7.com/letter_avatar_proxy/v4/letter/k/9f8e36/32.png) [@Kumar](https://discuss.rapid7.com/u/Kumar)\
**Post date:** [June 2, 2023, 5:25pm UTC](https://discuss.rapid7.com/t/calculate-average-age-days-of-known-critical-vulnerabilities/23725/2 "2023-06-02T17:25:58Z")

</div>

@john_hartman Could you help me with the query?

---

<div class="post-metadata">

**Author:** ![john\_hartman](https://discuss.rapid7.com/user_avatar/discuss.rapid7.com/john_hartman/32/1255_2.png) [@john\_hartman](https://discuss.rapid7.com/u/john_hartman)\
**Post date:** [June 2, 2023, 6:31pm UTC](https://discuss.rapid7.com/t/calculate-average-age-days-of-known-critical-vulnerabilities/23725/3 "2023-06-02T18:31:46Z")

</div>

There are cards called “Average Days to Remediate By CVSSv3 Severity Ratings” or “Average Days to Remediate By Severity” in the Dashboard card library. However this just looks at all severities and averages them out without displaying the individual vulnerabilities.

For a SQL Query you would need to look at the finding date of the vulnerability and calculate the time to now. This would give you the amount of time that something has been vulnerable per asset and then you could average it out per all assets vulnerable.
