The Product Complexity Index is based on two main concepts: diversity and ubiquity. Diversity refers to the number of products that the region exports with comparative advantage. Ubiquity is the number of regions that export a given product with comparative advantage. The index is based on the idea that more complex products are produced and exported by a smaller number of regions, while requiring more productive knowledge to be manufactured. Therefore, more complex products are those produced by few regions that produce different products.
The Economic Complexity Index measures the diversity and complexity of a locations's economy. It is calculated by taking the average complexity of the products a location exports with international comparative advantage, weighted by their share in the location's overall exports.
If it is of interest, the formulas for the calculation of these indices can be found at: https://atlas.media.mit.edu/atlas/