Context.Comets are planetesimals left over from the formation of planets in the solar system. With a growing number of observed molecular abundances in many comets, and an improved understanding of chemical evolution in protoplanetary disk midplanes, comparisons can be made between models and observations that could potentially constrain the formation histories of comets.Aims.Our aim is to carry out the first statistical comparison between cometary volatile ice abundances and modelled evolving abundances in a protoplanetary disk midplane.Methods.Aχ2-method was used to determine maximum likelihood surfaces for 14 different comets that formed at a given time (up to 8 Myr) and place (out to beyond the CO iceline) in the pre-solar nebula midplane. This was done using observed volatile abundances for the 14 comets and the evolution of volatile abundances from chemical modelling of disk midplanes. Two assumptions for the chemical modelling starting conditions (cloud inheritance or chemical reset), as well as two different sets of cometary molecules (parent species, with or without sulphur species) were investigated.Results.Considering all parent species (ten molecules) in the reset scenario,χ2likelihood surfaces show a characteristic trail in the parameter space with high likelihood of formation around 30 AU at early times and 12 AU at later times for ten comets. This trail roughly traces the vicinity of the CO iceline in time.Conclusions.A statistical comparison between observed and modelled chemical abundances in comets and comet-forming regions could be a powerful tool for constraining cometary formation histories. The formation histories for all comets were constrained to the vicinity of the CO iceline, assuming that the chemistry was partially reset early in the pre-solar nebula. This is found, both when considering carbon-, oxygen-, and sulphur-bearing molecules (ten in total), and when only considering carbon- and oxygen-bearing molecules (seven in total). Since these 14 comets did not previously fall into the same taxonomical categories together, this chemical constraint may be proposed as an alternative taxonomy for comets. Based on the most likely time for each of these comets to have formed during the disk chemical evolution, a formation time classification for the 14 comets is suggested.