Calculators use standard transmission line model equations to arrive at the final dimensions. The typical workflow includes: Patch Antennas - MATLAB & Simulink - MathWorks microstrip patch antenna calculator
A simplified approximation for the inset depth to achieve 50$\Omega$ is: $$y_0 \approx \fracL\pi \cos^-1\left( \sqrt\frac50R_in(y=0) \right)$$ (Note: $R_in(y=0)$ is the input impedance at the edge of the patch, typically 100-300 Ohms depending on geometry. The inset cuts into the patch by distance $y_0$). typically 100-300 Ohms depending on geometry.