The observational data on the anisotropy of the cosmic microwave background constraints the scalar spectral tilt n s and the tensor to scalar ratio r which depend on the first and second derivatives of the inflaton potential. The information can be used to reconstruct the inflaton potential in the polynomial form up to some orders. However, for some classes of potentials, n s and r behave as n s (N ) and r(N ) universally in terms of the number of e-folds N . The universal behaviour of n s (N ) can be used to reconstruct a class of inflaton potentials. By parametrizing one of the parameters n s (N ), ǫ(N ) and φ(N ), and fitting the parameters in the models to the observational data, we obtain the constraints on the parameters and reconstruct the classes of the inflationary models which include the chaotic inflation, T-model, hilltop inflation, s-dual inflation, natural inflation and R 2 inflation.