Fluxes of methane (CH4) and nitrous oxide (N2O) are commonly measured with closed static chambers. Here, we analyse several of the uncertainties inherent in these measurements, including the accuracy of calibration gases, repeatability of the concentration measurements, choice of model used to calculate the flux and lack of fit to the model, as well as inaccuracies in measurements of sampling time, temperature, pressure and chamber volume. In an analysis of almost 1000 flux measurements from six sites in the UK, the choice of model for calculating the flux and model lack-of-fit were the largest sources of uncertainty. The analysis provides confidence intervals based on the measurement errors, which are typically 20%. Our best estimate, using the best-fitting model, but substituting the linear model in the case of concave fits, gave a mean flux that is 25% greater than that calculated with the linear model. The best-fit non-linear model provided a better (convex) fit to the data than linear regression in 36% of the measurements. We demonstrate a method to balance the number of gas samples per chamber (nsamples) and the number of chambers, so as to minimize the total uncertainty in the estimate of the mean flux for a site with a fixed number of gas samples. The standard error generally decreased over the available range in nsamples, suggesting that more samples per chamber (at the expense of proportionally fewer chambers) would improve estimates of the mean flux at these sites.