The foundational ecosystem processes of gross primary production (GPP) and ecosystem respiration (ER) cannot be measured directly but can be modeled in aquatic ecosystems from subdaily patterns of oxygen (O2) concentrations. Because rivers and streams constantly exchange O2 with the atmosphere, models must either use empirical estimates of the gas exchange rate coefficient (K600) or solve for all three parameters (GPP, ER, and K600) simultaneously. Empirical measurements of K600 require substantial field work and can still be inaccurate. Three-parameter models have suffered from equifinality, where good fits to O2 data are achieved by many different parameter values, some unrealistic. We developed a new three-parameter, multiday model that ensures similar values for K600 among days with similar physical conditions (e.g., discharge). Our new model overcomes the equifinality problem by (1) flexibly relating K600 to discharge while permitting moderate daily deviations and (2) avoiding the oft-violated assumption that residuals in O2 predictions are uncorrelated. We implemented this hierarchical state-space model and several competitor models in an open-source R package, streamMetabolizer. We then tested the models against both simulated and field data. Our new model reduces error by as much as 70% in daily estimates of K600, GPP, and ER. Further, accuracy benefits of multiday data sets require as few as 3 days of data. This approach facilitates more accurate metabolism estimates for more streams and days, enabling researchers to better quantify carbon fluxes, compare streams by their metabolic regimes, and investigate controls on aquatic activity.