How do you compute the progress to the next version?

I noticed a progress bar at the main page, I’m very curious about how do you compute the progress
to the next version.

For example:

It’s just the percentage of closed issues in the next milestone.