How are 'Active' and 'Drifting Away' contributors computed? And when does a drifting contributor become completely inactive?

One question frequently asked on the Active and Drifting Away contributor metric on the trends dashboard is how are these metrics computed over time and how does the drifting contributors affect the overall count of the active contributors?

What criteria is used for defining active and drifting away contributors?
An active contributor is someone who did at least one code related activity viz. commits, PRs/changesets and issues in the last 1 year. On the other hand a contributor is said to be drifting away if they haven’t participated in any code related in the activity in the last 6 months. Hence, drifting away contributors are a subset of active contributors that might potentially become inactive in the near future

Let’s take a look at an example

Here, we are looking at weekly aggregated data of the Contributor Growth and Retention trend graph. Each straight line bar in the chart shows the count of Active and Drifting Away contributors computed for that week. For instance, the first data point shows the count of Active contributors until Sept 17, 2021 i.e count of all the code contributors between Sept 17, 2020 - Sept 17, 2021. Similarly, the next data point shows the count of Active Contributors until Sept 24, 2021 and so on.

As the time progresses we see the number of drifting away contributors going up as well which indicates that some contributors who were previously active have not been contributing to any code related activity in the last 6 months.

Both of the metrics i.e. active as well as drifting away contributors are computed for each time interval as shown on the graph. Hence each data point on the graph is independent of the previous. It can very well be possible that someone who is considered as drifting away might again become active if they start contributing again. Therefore, the count of drifting away contributors can change over time and the current count is an indicator of probable future inactive contributors.

A drifting away contributor becomes completely inactive if they no longer qualify as being an active contributor i.e. they have been in drifting away for more than a year continuously.