I need to calculate minimum sample size with this parameters:

- provide 95% confidence

- meet the company's conditions as to the maximum defect level (e.g. 11 ppm)

- solution need to be flexible (for example for daily population, monthly population, yearly population, 1000, 10000 or 10000000 samples)

- values are binomial (defected or not defected)

1. Military standard MIL STD 105D not provide data for populations much larger than 500000, for example if I have 10000000 population, in theory I still only need to take 2000 samples and I can't find any defect, because one defect disable whole population.

2. The "Sample size estimation" function in Minitab does not take into account the population size and shows low values of the necessary samples.

3. I found something like this calculator (cogentqc.com/tools-resources/statistical-calculator) but I don't know what math calulations it make.

4. I found this "Handbook" (itl.nist.gov/div898/handbook/prc/section2/prc242.htm) but I am not sure that this is good solution in my case, and I can't found/calculate needed parameters, I know only what mean "h".

I need Your help. Thanks! Have a nice day!