The demand for automated attendance management systems has significantly increased in educational institutions and corporate environments where manual methods are prone to inefficiencies and errors. This paper presents a real-time, facial recognition-based attendance system developed using Flask, OpenCV, and machine learning techniques. The system employs OpenCV’s Haar Cascade classifier for face detection and the K-Nearest Neighbours (KNN) algorithm for face recognition. During user registration, the system captures 10 images per individual to ensure robust recognition across various facial expressions. The web interface, built using Flask, facilitates user interaction for managing attendance records stored in CSV format. The system achieves an accuracy of 92% under optimal lighting conditions, though performance decreases to 80% in low-light environments. Recognition is completed in approximately 2 seconds, making the system suitable for real-time applications in classrooms or offices. Despite handling real-time image streaming efficiently, challenges such as reduced accuracy when handling obstructions like masks or glasses remain. Future enhancements will explore the integration of deep learning models, such as Convolutional Neural Networks (CNNs), to improve robustness and scalability. This system demonstrates the potential of facial recognition technology for automating attendance tracking, with significant applications in both educational and corporate sectors