Sample Size Determination Formula


I am currently working through the sample size determination module in “python for data analysis”. When using the sample size calculator ( I notice that it produces different results from many other online calculators for sample size.

I am wondering is there anywhere I can find out the formula that the sample size calculator in the course is using? and how to calculate the sample size manually?


If you look at the page source you can read the code for yourself

Thanks, is there an explanation anywhere from where this formula actually comes from?