Non-contact distance measurement using sensors allows measurements when conventional tools reach their limits. These measurements can be integrated into the Internet of Things (IoT) through IoT-enabled microcontrollers, but sensor accuracy and precision must first be verified. This study compares two sensors—infrared time-of-flight and ultrasonic—in terms of accuracy and precision. An object reflecting sound and electromagnetic waves was placed at set distances, and sensor readings were compared to ruler measurements. The sensors showed good precision, with the infrared sensor outperforming the ultrasonic one. However, both lacked the accuracy compared to actual distances. The infrared sensor was consistently more accurate, requiring less correction to align with true distances. While the ultrasonic sensor performed better at short distances, its accuracy dropped significantly beyond 40 cm. Overall, the infrared sensor proved superior in accuracy. These findings highlight the potential for integrating such sensors into standalone or IoT-connected systems for reliable measurements.