To get something out of the way first: you would not be calculating this by hand, pretty much ever. For certain integer degrees of freedom, the $t$ cumulative distribution function (CDF) reduces to something where this would be doable, but the general integral involves the Beta (or Gamma) function which you wouldn't be working out by hand, especially for non-integer values. We have a different kind of computer now than the ones that generated such tables.
That said, all of the functions you need for these calculations are defined for any positive degrees of freedom $\nu$. For example, the $t$ CDF can also be calculated in terms of the regularized incomplete Beta function $\text{B}$:
$$
P(T\le t) = \int_{-\infty}^tf(t)\ \text{d}t=\frac{1}{2}\ \text{B}\left(\frac{\nu}{t^2+\nu}, \frac{\nu}{2}, \frac{1}{2}\right).
$$
This regularized incomplete Beta function is in reality just its CDF, so now you need to evaluate a Beta integral. Another alternative of the $t$ CDF includes evaluating an infinite sum. Some numerical approximations might be reasonable, though usually only in specific cases (e.g. large $\nu$). I hope that from all of this it's clear that attempting to tackle this problem to a high degree of precision using only pen and paper is an exercise in masochism.
Any statistical software package worth its salt will have implementations of these functions, for example the free & open-source R
:
t <- 2.968
nu <- 5.1
## Calculate two-sided P-value directly:
2 * pt(-abs(t), nu)
#> 0.03047769
## One-sided lower tail via regularized Beta
oneside <- 0.5 * pbeta( nu/(nu+t^2), nu/2, 1/2)
## Two-sided
2 * oneside
#> 0.03047769
This bottom calculation is actually what pt
does internally, albeit with a bit less care for numerical precision. Finally, a note of caution against interpolating from pre-calculated tables: for a given $t$-statistic the P-value is not a linear function of $\nu$.