In Nv it is a very complicated formula. It is called a bankroll. I have posted it several times in the past, check the archives.