This seems an often encountered problem. By "Cochran," I assume you mean the "formulas" found derived in his book "Sampling Techniques," Wiley, the latest edition being the third in 1977. He has a chapter there where he derives sample size "formulas" for a simple random sample, in one case for continuous data, and in another case for proportions, i.e., yes/no data. He then gives information in other chapters concerning stratified random sampling and cluster (random) sampling. "Slovin" is a special case for simple random sampling, I think with proportions, and I assume "Taro Y," of which I don't know I've ever heard anything, and others are probably also special cases. Best to stick with the general cases you can tailor to what you want. There are also model-assisted and model-based techniques as well as more complex probability-of-selection designs, and for the latter, some of which might best be studied using simulations.
Anyway, rather than use something like Slovin, I suggest sticking with something you could find perhaps in the Pennsylvania State University online course information, available to all. You could search on a term and add "Pennsylvania State University" to the search term. Best wishes.
PS - Which "formula" is "best" is always determined by your individual application - so this varies.
FYI: Sample size formulas are derived based on the methodology used, the inherent standard deviation(s), and the desired standard error to be obtained, assuming no kind of bias is a problem. Even when using the power from a hypothesis test (tests which I would rarely if ever suggest, but if you use them, you should study power and effect size), the key is basically still obtained standard error.
Here is a derivation of sample size requirements for a simple case using a simple model-based method:
There I compare the format for the "formula" obtained to the format used in Cochran(1977) for the formula for sample size determination using simple random sampling and continuous data.
PS - Online "calculators" usually assume simple random sampling, proportions, and the worst (largest n) case where p = q = 0.5, and without considering the finite population correction (fpc) factor.
Dear Muhammad Ilyas, For sample size, you may get inspiration/guidelines from the following studies:
Fleiss, J. L., Cohen, J., & Everitt, B. S. (1969). Large sample standard errors of kappa and weighted kappa. Psychological Bulletin, 72(5), 323–327. https://doi.org/10.1037/h0028106
Krejcie, R. V., & Morgan, D. W. (1970). Determining sample size for research activities. Educational and Psychological Measurement, 30(3), 607–610. https://doi.org/10.1177/001316447003000308
Israel, G. (1992). Determining sample size. PEOD-6, University of Florida, USA, fact sheet, 1–5.