I have a rectangle and I want to know the vertical distance between the highest point and the lowest point. The rectangle is 3×8 cm, and is rotated by $\theta$.
So for example in this picture I would need to know the length of the blue line (H, F):
Does anyone know a formula to calculate this?

In the figure, the height is equal to $AG + BH$.
We have $AG = AB \cos \theta$ and $BH = BC \sin \theta$.