Noise margin calculation for schmitt and non-schmitt input signals
The noise margin calculation is the same for all types of inputs.

When you have a constant voltage level (either high or low), the noise margin prevents noise from changing the logic level seen at the input.

When the signal is switching (high→low or low→high) and near the actual threshold, noise could make the voltage level seen at the input cross the threshold multiple times. A Schmitt trigger has two threshold levels (hysteresis), which prevents these oscillations. (See What is a Schmitt Trigger and its application exactly?)