bai formula