Abstract. Ammonia (NH3) is an abundant trace gas in the atmosphere and an important player in atmospheric chemistry, aerosol formation and the atmosphere-surface exchange of nitrogen. It is recognized as a major source of aerosol pollution, and it may limit the formation of cloud nuclei in remote or cold parts of the atmosphere. For soil and plants, NH3-mediated nitrogen can act as a harmful pollutant or as a desirable nutrient, mostly in natural and agricultural settings, respectively. Agriculture is also the main source of atmospheric NH3 via volatilization from fertilizers and manure processing in livestock farming. The accurate determination of NH3 emission rates remains a challenge, partly due to the propensity of NH3 to interact with instrument surfaces leading to high detection limits and slow response times. In this paper, we present a new method for quantifying ambient NH3, using chemical ionization mass spectrometry (CIMS) with deuterated benzene cations as reagents. The setup aimed at limiting sample-surface interactions and achieved a 1-σ precision of 10–20 pptv and an immediate 1/e response rate < 0.4 s, which compares favorably to the existing state of the art. The sensitivity exhibited an inverse humidity dependence, in particular in relatively dry conditions. Background of up to 10 % of the total signal required consideration as well, as it responded on the order of a few minutes. To showcase the method’s capabilities, we quantified NH3 mixing ratios from measurements obtained during deployment on a Gulfstream I aircraft during the HI-SCALE (Holistic Interactions of Shallow Clouds, Aerosols and Land Ecosystems) field campaign in rural Oklahoma during May 2016. Typical mixing ratios were 1–10 parts per billion by volume (ppbv) for the boundary layer and 0.1–1 ppbv in the lower free troposphere. Sharp plumes of up to 10s of ppbv of NH3 were encountered as well. We identified two of their sources as a large fertilizer plant and a cattle farm, and our mixing ratio measurements yielded upper bounds of 350 ± 50 and 0.6 kg NH3 h–1 for their respective momentary source rates. The fast response of the CIMS also allowed us to derive vertical NH3 fluxes within the turbulent boundary layer via eddy covariance, for which we chiefly used the continuous wavelet transform technique. As expected for a region dominated by agriculture, we observed predominantly upward fluxes, implying net NH3 emissions from surface. The corresponding analysis focused on the most suitable flight, which contained two straight-and-level legs at ~300 m above ground. We derived NH3 fluxes between –4 and 18 mol km–2 h–1 for these legs, at an effective spatial resolution of 1–2 km. The analysis demonstrated how flux measurements benefit from suitably arranged flight tracks with sufficiently long straight-and-level legs, and explores the detrimental effect of measurement discontinuities. Following flux footprint estimations, comparison to the NH3 area emissions inventory provided by the US Environmental Protection Agency indicated overall agreement, but also the absence of some sources, for instance the identified cattle farm. Our study concludes that high-precision CIMS measurements are a powerful tool for in-situ measurements of ambient NH3 mixing ratios, and even allow for the airborne mapping of the air-surface exchange of NH3.