What is the degree of $\cos(2\pi/8) + i \sin(2\pi/8)$ over $\mathbb{Q}$ ?
I note that $\cos(2\pi/8) + i \sin(2\pi/8)$ is a root of $x^8-1$.
$x^8-1$ can be factored into $x^8-1 =(x^4+1)(x^2+1)(x+1)(x-1)$. Clearly $(x^4+1)$ is irreducible. So is the degree 4? Do we always choose the polynomial with the highest degree that is irreducible.
Since $\cos\left(\frac{2\pi}8\right)+\sin\left(\frac{2\pi}8\right)i=\cos\left(\frac\pi4\right)+\sin\left(\frac\pi4\right)i$, it is more natural to say right away that it is a root of $x^4+1$. And, yes, since this polynimial is irreducible in $\mathbb Q[x]$, you can deduce that your number is an algebraic number with degree $4$.