There's probably a more elementary reference, but, according to [Bushnell, Henniart, and Kutzko - Local Rankin–Selberg convolutions for $\operatorname{GL}_n$](https://www.ams.org/journals/jams/1998-11-03/S0894-0347-98-00270-7), (6.1.2), if $m$ is the level of $\pi$, then the conductor of $\pi$ depends on a choice of additive character $\psi$, which will be trivial on $\mathfrak p^{c(\psi)}$ but not on $\mathfrak p^{c(\psi) - 1}$ for some integer $c(\psi)$, and is given by $$ f(\pi) = 2(1 + c(\psi) + m/e), $$ where $e$ is $1$ if $\pi$ is unramified and $2$ if $\pi$ is ramified.