Formula used for sample size calculation for a survey: n=z2 *p(1-p)/d2 or with corrected factor. Likelihood of having controlled blood glucose level: (OR 95% CI 1.50 [1.23;1.76]) in result section of a paper.
Other than that, the things you mentioned all depend upon standard errors for means, which all depend upon the standard deviation of a population of the data of interest, or of the estimated residuals in regression (or often better, the random factors of the estimated residuals in WLS regression). The standard deviations do not change with sample size, but may be estimated better with a larger sample size, or perhaps distorted by nonsampling error.
There are two main ways to do this, and you have seen them.
In the case of model-based sampling and estimation, you see a format for sample size selection that corresponds to that for simple random sampling, because they all depend upon standard deviations of data directly, or for regression, from residuals.
PS - Above is for continuous, and for yes/no data. I suppose principles likely apply in some way to all data types. I worked with continuous data and regressions mostly.
PSS -
Since you mentioned the finite population correction factor, I assume you are looking at a finite population.
Thank you for your quick answer. I will look in to all the materials you suggested me. If I understand your answer. P-value and margin of error are not same. In fact, I am using dichotomous variables.