In complex analysis, The Stirling formula,
\begin{align*}
\Gamma(s) = \left(\frac{2\pi}{s}\right)^{1/2}\left(\frac{s}{e}\right)^{s}\left(1+O\left(\frac{1}{|s|}\right)\right)
\end{align*}
is valid in the angle $|\arg(s)|\leq \pi-\varepsilon$ with the implied constant depening on $\varepsilon$.
Hence for $s=\sigma+it$, $t\ne 0$, $\sigma$ fixed
\begin{align*}
\Gamma(\sigma+it) = \sqrt{2\pi} (it)^{\sigma-\frac{1}{2}}e^{-\frac{\pi}{2}|t|} \left(\frac{|t|}{e}\right)^{it}\left(1+O\left(\frac{1}{|t|}\right)\right).
\end{align*}
If I consider complex logarithm then I can write
\begin{align*}
\log\Gamma(\sigma+it) = \log|\Gamma(\sigma+it)|+i\arg(\Gamma(\sigma+it))
\end{align*}
In absolute value we have
\begin{align*}
|\Gamma(\sigma+it)| = \sqrt{2\pi}|t|^{\sigma-\frac{1}{2}}e^{-\frac{\pi}{2}|t|} \left(1+O\left(\frac{1}{|t|}\right)\right).
\end{align*}
How to calculate $\arg(\Gamma(\sigma+it))$?
Best Answer
When $\sigma$ lies in a fixed interval and $t\to+\infty$, a convenient version of Stirling's formula (See equation 4.12.1 of Titchmarh's The theory of the Riemann zeta-function) is stated as follows:
$$ \log\Gamma(\sigma+it)=\left(\sigma+it-\frac12\right)\log(it)-it+\frac12\log2\pi+\mathcal O\left(1\over t\right) $$
Taking imaginary components on both side gives
$$ \arg\Gamma(\sigma+it)=t\log t-t+\left(\sigma-\frac12\right)\frac\pi2+\mathcal O\left(1\over t\right) $$