Background Erlotinib (ERL) is a crucial tyrosine kinase inhibitor utilized for treating non-small cell lung cancer (NSCLC) and pancreatic cancer. However, due to its significant adverse effects, precise dosage monitoring is essential throughout treatments.Methods This study developed a sensitive and specific screen-printed electrode (SPE) sensor to detect erlotinib in human serum, urine, and pharmaceutical dosage forms. The sensor's linear response range, limit of detection (LOD), and limit of quantification (LOQ) were determined. Additionally, the sensor's selectivity was assessed by studying electro-oxidation in the presence of common interfering molecules.Results The developed sensor exhibited a linear response range of 2.0 mu M to 34.0 mu M, with a LOD of 0.03 mu M and a LOQ of 0.84 mu M. Excellent recovery values were observed in human serum, urine, and tablet dosage forms, demonstrating the sensor's applicability. The selectivity study confirmed the sensor's ability to accurately quantify erlotinib in the presence of interfering substances.Conclusion The research presents a novel and reliable technique for therapeutic drug monitoring of erlotinib using a screen-printed electrode sensor. This method offers a quick, simple, and cost-effective approach for detecting ERL in actual samples, thereby facilitating improved dosage monitoring in clinical settings.