Abstract The dynamics of radially expanding magnetic clouds is rigorously analyzed within the framework of ideal MHD. The cloud is modelled as a cylindrically symmetric magnetic flux rope. In the force balance we include the gas pressure gradient and the Lorentz force. Interaction with the ambient solar wind due to expansion of the magnetic cloud is represented by a drag force proportional to the bulk velocity. We consider the self-similar expansion of a polytrope, and reduce the problem to an ordinary non-linear differential equation for the evolution function. Analyzing the asymptotic behaviour of the evolution function, we formulate theoretical expectations for the long-term behaviour of cloud parameters. We focus on the temporal evolution of (i) the magnetic field strength; (ii) the twist of the field lines; (iii) the asymmetry of the total field profile; and (iv) the bulk flow speed. We present data from two magnetic clouds observed at 1 AU and 2 AU, respectively, and find good agreement with theoretical expectations. For a peak magnetic field strength at 1 AU of 25 nT and a polytropic index of 0.5, we find that a magnetic cloud can be distinguished from the background interplanetary field up to a distance of ∼5 AU. Taking larger magnetic fields (up to 30 nT) and bigger polytropic indices (up to 0.6) this distance can double.