The well-known fiber dimension theorem in algebraic geometry says that for every morphism f:X→Y of integral schemes of finite type the dimension of every fiber of f is at least dim X−dim Y. This has recently been generalized by Brosnan, Reichstein and Vistoli to certain morphisms of algebraic stacks f:𝒳→𝒴, where the usual dimension is replaced by essential dimension. We will prove a general version for morphisms of categories fibered in groupoids. Moreover, we will prove a variant of this theorem, where essential dimension and canonical dimension are linked. These results let us relate essential dimension to canonical dimension of algebraic groups. In particular, using the recent computation of the essential dimension of algebraic tori by MacDonald, Meyer, Reichstein and the author, we establish a lower bound on the canonical dimension of algebraic tori.