Principal and Actual Values for Phase Response
the Principal value, $ -\pi &lt; \Phi \le +\pi $, of phase is always

$$\begin{align}
\Phi &amp; \triangleq \operatorname{Arg}\{H(e^{j \omega})\}   \\
 &amp;= \operatorname{Arg} \bigg\{ \Re\{H(e^{j \omega})\} + j \,\Im\{H(e^{j \omega})\} \bigg\} \\
 &amp;= \operatorname{atan2}\left(\Im\{H(e^{j \omega})\},\,\Re\{H(e^{j \omega})\}\right) \\
\end{align}$$

the four-quadrant arctangent:

$$\begin{align}
\operatorname{atan2}(y,x) &amp;= \begin{cases}
\arctan(\frac y x) &amp;\text{if } x &gt; 0, \\
\arctan(\frac y x) + \pi &amp;\text{if } x &lt; 0 \text{ and } y \ge 0, \\
\arctan(\frac y x) - \pi &amp;\text{if } x &lt; 0 \text{ and } y &lt; 0, \\
+\frac{\pi}{2} &amp;\text{if } x = 0 \text{ and } y &gt; 0, \\
-\frac{\pi}{2} &amp;\text{if } x = 0 \text{ and } y &lt; 0, \\
\text{undefined} &amp;\text{if } x = 0 \text{ and } y = 0 \\
\end{cases} \\
\\
&amp;= \begin{cases}
\arctan\left(\frac{y}{x}\right) &amp;\text{if } x &gt; 0, \\
\frac{\pi}{2} - \arctan\left(\frac{x}{y}\right) &amp;\text{if } y &gt; 0, \\
-\frac{\pi}{2} - \arctan\left(\frac{x}{y}\right) &amp;\text{if } y &lt; 0, \\
\arctan\left(\frac{y}{x}\right) \pm \pi &amp;\text{if } x &lt; 0, \\
\text{undefined} &amp;\text{if } x = 0 \text{ and } y = 0 \\
\end{cases} \\
\end{align}$$

if, by "Actual value", you mean the unwrapped phase, if you have $\frac{N}{2}$ data points for frequency

$$ \omega[k] \triangleq \frac{2 \pi}{N}k $$

then, assuming real coefficients, define your phase at DC to be:

$$ \phi[0] = \Phi[0] = \begin{cases}
0 \quad &amp; H(e^{j 0}) = H(1) \ge 0 \\
\pm \pi &amp; H(e^{j 0}) = H(1) &lt; 0 \\
\end{cases} $$

then for $ 1 \le k &lt; \frac{N}{2} $ unwrapped phase is

$$ \phi[k] = \phi[k-1] + \Phi[k] - \Phi[k-1] + \theta[k]  $$

where 

$$ \theta[k] = \begin{cases}
2 \pi \quad &amp; \text{if } \Phi[k] &lt; \Phi[k-1] - \pi  \\
0 &amp; \text{if } \Phi[k-1] - \pi \le \Phi[k] \le \Phi[k-1] + \pi  \\
-2 \pi \quad &amp; \text{if }  \Phi[k-1] +\pi &lt; \Phi[k]   \\
\end{cases}$$

that's pretty much what MATLAB's unwrap() does.

there's a better way to do the phase difference of adjacent discrete frequencies:

the unwrapped phase for $ 1 \le k &lt; \frac{N}{2} $ can also be expressed as

$$\begin{align}
 \phi[k] &amp;= \phi[k-1] + \Phi[k] - \Phi[k-1] + \theta[k] \\
  &amp;= \phi[k-1] + \Delta \phi[k] \\
\end{align}$$

where 

$$\begin{align}
 \Delta \phi[k] &amp;= \Phi[k] - \Phi[k-1] + \theta[k] \\
  &amp;= \phi[k] - \phi[k-1] \\
  &amp;= \arg\{H(e^{j \omega[k]})\} - \arg\{H(e^{j \omega[k-1]})\} \\
 \\
 &amp;= \arg\left\{ \frac{H(e^{j \omega[k]})}{H(e^{j \omega[k-1]})} \right\} \\
 \\
 &amp;= \arg\left\{ \frac{\Re\{H(e^{j \omega[k]})\} + j \Im\{H(e^{j \omega[k]})\}}{\Re\{H(e^{j \omega[k-1]})\} + j \Im\{H(e^{j \omega[k-1]})\}} \right\} \\
 \\
 &amp;= \arg\left\{ \frac{(\Re\{H(e^{j \omega[k]})\} + j \Im\{H(e^{j \omega[k]})\})(\Re\{H(e^{j \omega[k-1]})\} - j \Im\{H(e^{j \omega[k-1]})\})}{(\Re\{H(e^{j \omega[k-1]})\} + j \Im\{H(e^{j \omega[k-1]})\})(\Re\{H(e^{j \omega[k-1]})\} - j \Im\{H(e^{j \omega[k-1]})\})} \right\} \\
 \\
 &amp;= \arg\left\{ \frac{\Re\{H(e^{j \omega[k]})\}\Re\{H(e^{j \omega[k-1]})\} - j^2 \Im\{H(e^{j \omega[k]})\}\Im\{H(e^{j \omega[k-1]})\} + j \Im\{H(e^{j \omega[k]})\}\Re\{H(e^{j \omega[k-1]})\} - j\Re\{H(e^{j \omega[k]})\}\Im\{H(e^{j \omega[k-1]})\}}{|H(e^{j \omega[k-1]})|^2} \right\} \\
 \\
 &amp; = \arg\left\{ \begin{matrix} \Re\{H(e^{j \omega[k]})\}\Re\{H(e^{j \omega[k-1]})\} + \Im\{H(e^{j \omega[k]})\}\Im\{H(e^{j \omega[k-1]})\} \\ + \ j  \big(\Im\{H(e^{j \omega[k]})\}\Re\{H(e^{j \omega[k-1]})\} - \Re\{H(e^{j \omega[k]})\}\Im\{H(e^{j \omega[k-1]})\} \big) \end{matrix} \right\} \\
 \\
 &amp; = \arctan \left( \frac{\Im\{H(e^{j \omega[k]})\}\Re\{H(e^{j \omega[k-1]})\} - \Re\{H(e^{j \omega[k]})\}\Im\{H(e^{j \omega[k-1]})\}}{\Re\{H(e^{j \omega[k]})\}\Re\{H(e^{j \omega[k-1]})\} + \Im\{H(e^{j \omega[k]})\}\Im\{H(e^{j \omega[k-1]})\}} \right) \\
 \\
\end{align}$$

because $\Delta \phi[k]$ is expected to be

$$ -\frac{\pi}{2} &lt; \Delta \phi[k] &lt; \frac{\pi}{2} $$

even smaller in most non-pathological cases.

that might be the best way to unwrap phase given the real and imaginary parts of your frequency response function.