© 2023 Elsevier B.V.Development of simple methods for bacteria detection is of great importance, especially in the undeveloped countries where there are limited resources for microbial testing. Herein, we present a simple gradient centrifugation-based optical detection (GCB-OD) method for bacteria testing in skim milk. Our method incorporates capturing bacteria using nanoparticles in Eppendorf tubes, followed by separation of bacteria-captured particles in the sucrose gradient within 6 min of centrifugation. Using a simple mobile phone-setup, images of sucrose-gradients are captured, and optical density of the particle-bound bacteria zones are measured with a MATLAB software, without requirement of a sophisticated optical instrument. In this approach, different nanoparticles are compared according to delta-E (ΔE) color difference value and sedimentation rate to obtain detectable narrow particle-bound bacteria zones. The spherical shaped carbon nanoparticles (CNP) with mean diameters of 119 nm, are found suitable for low concentrations of bacteria detection for having high sedimentation rates comparing to smaller sized particles and having higher ΔE than other particles as well. For CNP-captured bacteria band detection, sucrose-gradient consist of 1 ml of 60–65–70 % (w/v) and 2 ml of 75 % (w/v) sucrose was found suitable. Escherichia coli (E. coli) was used as model fecal indicator bacteria, and the correlation of optical density and E. coli concentration showed linearity in the range of 1.5x100–1.5x104 CFU/ml E. coli in skim milk. The culture plating and transmission electron micrographs were utilized to evaluate bacterial capture performance. The developed simple centrifugation-based method that allows detection of 2 CFU/ml and 3 CFU/ml E. coli in 1XPBS and skim milk, can be useful for microbial testing in resource limited areas.