ca calcuation