Genetic programming (GP) is a flexible and powerful evolutionary technique with some special features that are suitable for building a classifier of tree representation. However, unsuitable step size of editing operator will destroy the continuity of the evolution. In this paper, we propose a multiage genetic programming (MGP) algorithm to build a classifier on a given training set. Individuals are grouped into different groups according to their ages (tree size). The competitions between individuals are limited in the same groups. That prevents the structure editing operators from destroying the continuity of the evolution. The experimental results showed that the MGP algorithm is superior to the traditional genetic programming algorithm (GP) in building decision tree.