N-nitrosodimethylamine (NDMA) is one of the most important disinfection by-products (DBPs) due to its carcinogenicity even at low concentrations which correspond to the levels occurring in drinking water and wastewater effluents. Therefore, NDMA is a candidate DBP that is expected to be regulated in the near future. However, the measurement of NDMA in the low nanogram per liter range is challenging because of the limitations of analytical techniques including both the sample preparation and the LC-MS/MS. Moreover, the accuracy of most of the current methods is only tested for drinking water and no information is present for other matrices. In this study, a combination of solid-phase extraction (SPE) and LC-MS/MS method that does not require high-resolution MS or advanced techniques for sample pretreatment is developed. Moreover, important factors that affect the optimization of the SPE method are provided to enable readers to optimize their own SPE procedures if necessary. The proposed method was validated for surface water, groundwater, and wastewater samples and the method quantification limit was 2 ng/L. In addition, the proposed method was used to determine the concentration of NDMA precursors measured as NDMA formation potential (NDMAFP) throughout a drinking water treatment plant at two different sampling periods. NDMAFP decreased by approximately 40 % in both samples. The concentrations ranged between 4 and 11.5 ng/L and the presence of these low concentrations underlines the need for an easy to use, yet sensitive method for the determination of NDMA in environmental matrices.