Abstract. Launched in October 2017, the TROPOspheric Monitoring Instrument (TROPOMI) aboard Sentinel-5 Precursor provides the potential to monitor air quality over point sources across the globe with a spatial resolution as high as 5.5 km × 3.5 km (7 km × 3.5 km before 6 August 2019). The nitrogen dioxide (NO2) retrieval algorithm for the TROPOMI instrument consists of three steps: the spectral fitting of the slant column, the separation of stratospheric and tropospheric contributions, and the conversion of the slant column to a vertical column using an air mass factor (AMF) calculation. In this work, an improved tropospheric NO2 retrieval algorithm from TROPOMI measurements over Europe is presented. The stratospheric estimation is implemented using the STRatospheric Estimation Algorithm from Mainz (STREAM), which was developed as a verification algorithm for TROPOMI and does not require chemistry transport model data as input. A directionally dependent STREAM (DSTREAM) is developed to correct for the dependency of the stratospheric NO2 on the viewing geometry by up to 2 × 1014 molec/cm2. Applied to synthetic TROPOMI data, the uncertainty in the stratospheric column is 3.5 × 1014 molec/cm2 for polluted conditions. Applied to actual measurements, the smooth variation of stratospheric NO2 at low latitudes is conserved, and stronger stratospheric variation at higher latitudes are captured. For AMF calculation, the climatological surface albedo data is replaced by geometry-dependent effective Lambertian equivalent reflectivity (GE_LER) obtained directly from TROPOMI measurements with a high spatial resolution. Mesoscale-resolution a priori NO2 profiles are obtained from the regional POLYPHEMUS/DLR chemistry transport model with the TNO-MACC emission inventory. Based on the latest TROPOMI operational cloud parameters, a more realistic cloud treatment is provided by a clouds-as-layers (CAL) model, which treats the clouds as uniform layers of water droplets, instead of the clouds-as-reflecting-boundaries (CRB) model, in which clouds are simplified as Lambertian reflectors. For the error analysis, the tropospheric AMF uncertainty, which is the largest source of NO2 uncertainty for polluted scenarios, ranges between 20 % and 50 %, leading to a total uncertainty in the tropospheric NO2 column in the 30–60 % range. From a validation performed with ground-based multi-axis differential optical absorption spectroscopy (MAX-DOAS) measurements, the improved tropospheric NO2 data shows good correlations for nine European urban/suburban stations with an average correlation coefficient of 0.78. The implementation of the algorithm improvements leads to a decrease of the relative difference from −55.3 % to −34.7 % on average.