Contamination index calculation