We describe a new approach for estimating changes in ice sheet mass. Two methods are in common use: the ice budget and geodetic methods. The first makes use of separate estimates of the mass fluxes into and out of a domain, differencing them to obtain the local mass balance. The second estimates mass balance directly, using measurements of the change in surface elevation, often from aircraft or satellites. Here we combine ice budget and geodetic approaches to obtain an optimal estimate of mass balance. We seek maximum likelihood solutions for three terms: (1) the rate of change of surface elevation, (2) the rate of snow accumulation, and (3) the local divergence of the ice flux. These estimates are constrained to obey the continuity equation. We allow the location and temporal averaging interval of the estimates to be chosen arbitrarily. This approach can use all relevant measurements. The fidelity of any measurement is lowered by measurement error, and by fluctuations in each of the three terms driven by random year-to-year snowfall variations. We take full account of both error sources, weighting the data so as to minimize the confounding effect of these influences. Realistic covariance between randomly forced fluctuations are provided by a linearized model of ice sheet flow. We test the approach by applying the algorithm to synthetically generated measurements. The method performs better than either ice budget or geodetic methods applied in isolation, and has the important advantage that good estimates may still be derived when measurements appropriate to either technique are lacking or inaccurate.