For a group G, we say that x,y∈G are in the same z-class if their centralizers in G are conjugate. The notion of z-class has origin in a connection between geometry and groups. However, as the notion is purely group theoretic, in this paper, we focus our attention on the influence of the z-classes on the structure of the group. The number of z-classes is invariant for a family of isoclinic groups. We obtain bounds for the number of z-classes in certain families of groups. A non-abelian finite p-group contains at least p+2z-classes. Moreover, we characterize the non-abelian p-groups with p+2z-classes; these are precisely, up to isoclinism, the p-groups of maximal class with an abelian subgroup of index p.