We propose a maximum likelihood (ML) based method to improve the bunching approach of measuring the elasticity of taxable income (ETI), and derive the estimator for several model settings that are prevalent in the literature, such as perfect bunching, bunching with optimization frictions, notches, and heterogeneity in the ETI. We show that the ML estimator is more precise and likely less biased than ad-hoc bunching estimators that are typically used in the literature. In the case of optimization frictions in the form of random shocks to earnings, the ML estimation requires a prior of the average size of such shocks. The results obtained in the presence of a notch can differ substantially from those obtained using ad-hoc approaches. If there is heterogeneity in the ETI, the elasticity of the individuals who bunch exceeds the average elasticity in the population