The $p$-value is the area under the $\chi^2$ density to the right of the observed test statistic. Therefore, to calculate the $p$-value by hand you need to calculate an integral.
In particular, a $\chi^2$ random variable with $k$ degrees of freedom has probability density
$$f(x;\,k) =
\begin{cases}
\frac{x^{(k/2)-1} e^{-x/2}}{2^{k/2} \Gamma\left(\frac{k}{2}\right)}, & x \geq 0; \\ 0, & \text{otherwise}.
\end{cases}$$
Suppose you observe a test statistic $\lambda$. Then, the $p$-value corresponding to $\lambda$ is
$$
p = \int_{\lambda}^{\infty}
\frac{x^{(k/2)-1} e^{-x/2}}{2^{k/2} \Gamma\left(\frac{k}{2}\right)}
dx $$
After trying to evaluate this integral by hand, it may become clear to you why people use tables (and computers) for calculating such things.
Edit: (This was in the comments but seemed important enough to add here) Note that you can write the $p$-value using special functions:
$$ p = 1−\frac{γ(k/2,λ/2)}{Γ(k/2)} $$
where $\gamma(\cdot,\cdot)$ is the lower incomplete gamma function.