To check the food from adulteration, it is always a challenging task for the scientist and engineers. In this paper, a relatively new method is proposed to check food from poisonous or deleterious substances which may cause injuries to health have been discussed and described. Both principles for understanding and mathematical relation are emphasized. The experimental observation with MATLAB simulation gives helium–neon laser, a powerful option for material characterization in a sensor system. We have realized the optical response of different samples (sugar, salt, mustard oil, coconut oil, almond oil) with respect to helium–neon laser power intensity. When helium–neon (He–Ne) laser light beam passes through different samples, it gives different power reading in power meter giving the relation between absorptivity of different sample concentrations. When concentrations of samples increase or added impurities, observed transmittance decreases and also finds the transmittance decrease with the increase in distance. The mathematical formula has been developed for concentration relation with solution and distance. © 2020, Springer Nature Singapore Pte Ltd.