According to coinmarketcap faq
https://coinmarketcap.com/faq/How are the prices calculated for the various cryptocurrencies?
Price is calculated by taking the volume weighted average of all prices reported at each market. Sources for the prices can be found on the markets section on each cryptocurrency page. For example, Bitcoin's markets.
This mean if one exchange have 60% of trading volume and another one 40% than price will be (0.60 x First price + 0.40 x Second price)....My assumptions
This could very well be true given that their derivatives range from the smallest to the largest of exchanges as there would be severe price discrepancies among the different exchanges and this could lead to faltering average prices being reflected on the site which could lead to uncertainties. Thus, I assume they gather prices from better renowned exchanges in the exact order of your calculation.