We present a maximum likelihood method for fitting two-dimensional model distributions to stellar data in colour-magnitude space . This allows one to include ( for example ) binary stars in an isochronal population . The method also allows one to derive formal uncertainties for fitted parameters , and assess the likelihood that a good fit has been found . We use the method to derive an age of 38.5 ^ { +3.5 } _ { -6.5 } Myrs and a true distance modulus of 7.79 ^ { +0.11 } _ { -0.05 } mags from the V vs V - I diagram of NGC2547 ( the uncertainties are 67 percent confidence limits , and the parameters are insensitive to the assumed binary fraction ) . These values are consistent with those previously determined from low-mass isochronal fitting , and are the first measurements to have statistically meaningful uncertainties . The age is also consistent with the lithium depletion age of NGC2547 , and the HIPPARCOS distance to the cluster is consistent with our value . The method appears to be quite general and could be applied to any N-dimensional dataset , with uncertainties in each dimension . However , it is particularly useful when the data are sparse , in the sense that both the typical uncertainties for a datapoint and the size of structure in the function being fitted are small compared with the typical distance between datapoints . In this case binning the data will lose resolution , whilst the method presented here preserves it . Software implementing the methods described in this paper is available from http : //www.astro.ex.ac.uk/people/timn/tau-squared/ .