Context : A large amount of magnetized plasma is frequently ejected from the Sun as coronal mass ejections ( CMEs ) . Some of these ejections are detected in the solar wind as magnetic clouds ( MCs ) that have flux rope signatures . Aims : Magnetic clouds are structures that typically expand in the inner heliosphere . We derive the expansion properties of MCs in the outer heliosphere from one to five astronomical units to compare them with those in the inner heliosphere . Methods : We analyze MCs observed by the Ulysses spacecraft using in situ magnetic field and plasma measurements . The MC boundaries are defined in the MC frame after defining the MC axis with a minimum variance method applied only to the flux rope structure . As in the inner heliosphere , a large fraction of the velocity profile within MCs is close to a linear function of time . This is indicative of a self-similar expansion and a MC size that locally follows a power-law of the solar distance with an exponent called \zeta . We derive the value of \zeta from the in situ velocity data . Results : We analyze separately the non-perturbed MCs ( cases showing a linear velocity profile almost for the full event ) , and perturbed MCs ( cases showing a strongly distorted velocity profile ) . We find that non-perturbed MCs expand with a similar non-dimensional expansion rate ( \zeta = 1.05 \pm 0.34 ) , i.e . slightly faster than at the solar distance and in the inner heliosphere ( \zeta = 0.91 \pm 0.23 ) . The subset of perturbed MCs expands , as in the inner heliosphere , at a significantly lower rate and with a larger dispersion ( \zeta = 0.28 \pm 0.52 ) as expected from the temporal evolution found in numerical simulations . This local measure of the expansion also agrees with the distribution with distance of MC size , mean magnetic field , and plasma parameters . The MCs interacting with a strong field region , e.g . another MC , have the most variable expansion rate ( ranging from compression to over-expansion ) . Conclusions :