  The Cremona group is the group of birational transformations of the plane. A
birational transformation for which there exists a pencil of lines which is
sent onto another pencil of lines is called a Jonqui\`eres transformation. By
the famous Noether-Castelnuovo theorem, every birational transformation $f$ is
a product of Jonqui\`eres transformations. The minimal number of factors in
such a product will be called the length, and written $\mathrm{lgth}(f)$. Even
if this length is rather unpredictable, we provide an explicit algorithm to
compute it, which only depends on the multiplicities of the linear system of
$f$.
  As an application of this computation, we give a few properties of the
dynamical length of $f$ defined as the limit of the sequence $n \mapsto
\mathrm{lgth} (f^n) / n$. It follows for example that an element of the Cremona
group is distorted if and only if it is algebraic. The computation of the
length may also be applied to the so called Wright complex associated with the
Cremona group: This has been done recently by Lonjou. Moreover, we show that
the restriction of the length to the automorphism group of the affine plane is
the classical length of this latter group (the length coming from its
amalgamated structure). In another direction, we compute the lengths and
dynamical lengths of all monomial transformations, and of some Halphen
transformations. Finally, we show that the length is a lower semicontinuous map
on the Cremona group endowed with its Zariski topology.
