Calculate afc