At the root, the issue here seems to be whether to use the z-statistic or the t-statistic in finding a confidence interval for the population mean $\mu$ or in testing a hypothesis about $\mu.$
Suppose $X_1, X_2, \dots, X_n$ is a random sample from a normal population of which both the mean $\mu$ and the standard deviation $\sigma$ are unknown. We wish to find a 95% confidence interval (CI) for $\mu.$
If we knew $\sigma$ then
$$Z = \frac{\bar X - \mu}{\sigma/\sqrt{n}} \sim Norm(0, 1).$$
Thus
$$P\left\{-1/96 \le \frac{\bar X - \mu}{\sigma/\sqrt{n}} \le 1.96\right\} = 0.95,$$
in which $\mu$ can be isolated in a few steps of algebra to
$$P\{\bar X - 1.96\sigma/\sqrt{n} \le \mu \le \bar X + 1.96\sigma/\sqrt{n}\} = 0.95.$$
And so we say that a 95% CI for $\mu$ is $\bar X \pm 1.96\sigma/\sqrt{n},$ in which all quantities $\bar X, \sigma,$ and $n$ are known. The numbers $\pm 1.96$ are chosen because they
cut 2.5% probability from the upper and lower tails of the standard normal distribution, leaving 95% in the center.
In case $\sigma$ is unknown, it is convenient to use the sample standard deviation $S$ instead, claiming that $\bar X \pm 1.96 S/\sqrt{n}$ or perhaps $\bar X \pm 2 S/\sqrt{n},$ is an approximate 95% CI for $\mu.$ If $n \ge 30,$
this approximation is pretty good, for reasons we see just below.
If $\sigma$ is not known, the exact distribution is
$$T = \frac{\bar X - \mu}{S/\sqrt{n}} \sim T(n-1),$$
Student's t distribution with $n-1$ degrees of freedom.
Then an exact 95% CI for $\mu$ is $\bar X \pm t^* S/\sqrt{n},$
where $t^*$ cuts 2.5% of probability from the upper tail of $T(n-1)$ and, by symmetry, $-t^*$ cuts 2.5% from the lower tail. Looking at tables of the t distribution we see that for $n \ge 30$ (or $n-1\le 29$), $t^*$ is approximately 2.0. So the approximate procedure with the standard normal distribution and the exact procedure with Student's t distribution amount to about the same thing.
For smaller values of $n$, the values of $t^*$ get noticeably larger.
For example if $n = 10$, we have $t^* = 2.262.$ Thus the 95% CI gets
longer (less precise). You can think of this loss of precision as a 'penalty' for having to estimate $\sigma$ by $S$ instead of knowing the exact value of $\sigma.$
There are a few good reasons to forget the 'rule of 30' altogether:
First,
it 'works' only for 95% CIs. For a 99% CI we need to cut 0.5% of probability from each tail: the normal cut-off value is $z^* = 2.576$
and we need to increase the sample size to about $n = 60$ before
$t^* \approx 2.6.$
Second, in using statistical software, either we know the exact
value of $\sigma$ or the program will approximate it from data as $S.$ From the start, we have to know whether we are doing a z-interval or a t-interval. Using an unnecessary rule about sample size
only confuses issue. The correct rule is: use z-procedures is $\sigma$ is known (and it usually isn't in practice); use t-procedures of not.
Third, some authors of elementary books try to use the 'rule of 30'
(without any theoretical justification) for various kinds of limiting procedures, applicability of the Central Limit Theorem, safe use of t-procedures for non-normal data, and so on. In these applications, 30 is seldom an appropriate dividing line.
I think you may be trying to find the sample size necessary to
achieve a certain margin of error in a confidence interval of
the type
$$\text{Parameter Estimate} \pm \text{Margin of Error}.$$
(1) Suppose you are going to have $n$ observations from a
normal population with unknown population mean $\mu$ and known
population standard deviation $\sigma_0.$ Then a 95% confidence
interval (CI) is
$$\bar X \pm 1.96 \sigma_0/\sqrt{n},$$
where $\bar X$ is the sample mean and $1.96 \sigma_0/\sqrt{n}$ is
the margin of error. If you want to have a specific margin of
error $E$ in your CI, then you set $E = 1.96 \sigma_0/\sqrt{n}.$
Everything but $n$ is known. Solve for $n$ and you know how
many observations to take.
(2) Suppose you are doing a poll to see how popular Caidate X is
in the weeks before an election. Then you want to estimate
the population proportion $p$ in favor on Candidate X. You
will estimate this is $\hat p = X/n$, where $X$ is the number
of interviewed people currently favoring Candidate X, and $n$
is the number of people interviewed. Then a 95% CI for $p$ takes
the form
$$\hat p \pm 1.96\sqrt{\hat p (1 - \hat p)/n}.$$
Here the margin of error is $1.96 \sqrt{p(1-p)/n}$, but you don't
know $p$. So, for planning purposes you might use $p = 1/2$
and set your desired margin of error
$$E = 1.96 \sqrt{p(1-p)/n} = 1.96\sqrt{.5(1-.5)/n} \approx 1/\sqrt{n}.$$ Then you can solve for $n$ and you will know
how many subjects to interview.
Undoubtedly, you will get different answers for $n$ depending on whether you use the formula in (1) or the formula in (2). And there
are other kinds of formulas for other kinds of problems.
So before you try to find $n$ for a particular experiment or
survey, you have to make sure you are thinking about the
correct kind of statistical analysis and have the correct
formula for $E$ in order to get a meaningful value of $n$.
Best Answer
I think you are doing it correctly by dividing the sample standard deviation by $\sqrt{n}$, however, there is a reason why the number is not exactly what you expect.
As the Central Limit Theorem says, if you have a population, independently of its distribution (so, not necessarily normal), the average of a sample will be distributed as a normal distribution. That means that if you sample an infinite number of 100 groups and compute the mean of each sample, these mean values will follow a normal distribution. The standard deviation of the mean estimate (that is, the standard error) will be indeed the average divided by $\sqrt{n}$.
However, if you don't get closer to the expected number, it may be a sampling issue. In that case, your means (and standard deviations) are almost normal, but not quite, and its computation is subject to error. This is precisely what Student's t-distribution models, so that's a way of narrow down your estimates with confidence intervals. Or, increase the number of samples.