There is increasing interest in modelling longitudinal dietary data and classifying individuals into subgroups (latent classes) who follow similar trajectories over time. These trajectories could identify population groups and time points amenable to dietary interventions. This paper aimed to provide a comparison and overview of two latent class methods: group-based trajectory modelling (GBTM) and growth mixture modelling (GMM). Data from 2963 mother–child dyads from the longitudinal Southampton Women’s Survey were analysed. Continuous diet quality indices (DQI) were derived using principal component analysis from interviewer-administered FFQ collected in mothers pre-pregnancy, at 11- and 34-week gestation, and in offspring at 6 and 12 months and 3, 6–7 and 8–9 years. A forward modelling approach from 1 to 6 classes was used to identify the optimal number of DQI latent classes. Models were assessed using the Akaike and Bayesian information criteria, probability of class assignment, ratio of the odds of correct classification, group membership and entropy. Both methods suggested that five classes were optimal, with a strong correlation (Spearman’s = 0·98) between class assignment for the two methods. The dietary trajectories were categorised as stable with horizontal lines and were defined as poor (GMM = 4 % and GBTM = 5 %), poor-medium (23 %, 23 %), medium (39 %, 39 %), medium-better (27 %, 28 %) and best (7 %, 6 %). Both GBTM and GMM are suitable for identifying dietary trajectories. GBTM is recommended as it is computationally less intensive, but results could be confirmed using GMM. The stability of the diet quality trajectories from pre-pregnancy underlines the importance of promotion of dietary improvements from preconception onwards.