This paper presents a complementary filter algorithm for sensor fusion to improve attitude estimation of a quadrotor UAV using a low-cost MEMS IMU. It combines gyroscope and accelerometer data, addressing issues of drift and environmental noise which can affect measurement accuracy. The results demonstrate that the proposed algorithm effectively yields smooth roll, pitch, and yaw angles for the quadrotor's motion control.