Extrapolation of trajectories through a magnetic field is needed at various stages of pattern recognition or track fitting procedures, with more or less precision. The Runge-Kutta method implies many calls to a field function and it is generally time consuming. In practice the trajectories may be split in steps between a few predefined surfaces, with possible additional short segments to match the actual measurements. On the other hand, in a collider, the particles used for physics analysis have a small impact parameter with respect to the origin; so, when crossing a given surface, they cover a small part of the phase space describing the local state. As a result, the extrapolation to another surface may be expanded as a polynomial function of the initial parameters within convenient ranges; these ranges and the degrees of the expansion may be tuned to find the best compromise between the precision and the fraction of particles within the domain of validity. An example of precomputed tables of coefficients is given for a long range extrapolation in a detector covering the forward region of a collider, inspired by the LHCb configuration.