Comfirm fraction calculation function