The age at first calving (AFC) is one of the most used indicators to evaluate the efficiency of rearing systems in dairy cattle herds. The objective of the present study was to evaluate the association between AFC and different parameters of productive and reproductive efficiency in dairy cows of Holstein and Jersey breeds and their crosses. A retrospective longitudinal study was carried out with information on the performance of 77,311 cows with birth and culling dates between 1990 and 2016 from 633 specialized dairy herds from mid and high-altitude regions of Costa Rica. Cows were classified into five categories according to their age in months at first calving (≤ 24, 25–27, 28–30, 31–33, ≥ 34). A generalized linear mixed model was used to assess the effect of AFC and racial factors on milk production (first lactation, lifetime total, and per day of life), open period (first calving and lifetime total), and herd life. The mean AFC was 29.5, 29.1, and 28.0 months for Holstein, Holstein×Jersey, and Jersey, respectively. The AFC was significantly associated (P < 0.01) with all the variables evaluated. Cows with AFC ≤ 24 presented a higher (P < 0.01) milk production (total lifetime and per day of life), as well as a longer herd life, compared to cows in categories of AFC > 28 m. The reduction in AFC contributes to a significant increase in the efficiency of dairy herds in Costa Rica.