Abstract This article presents a method for developing a low-cost apparatus to demonstrate Rayleigh’s criterion, which defines the resolution limit of optical instruments. The setup incorporates 3D-printed components, diode lasers, a circular aperture with a radius of 100 µ m, and a screen. Additionally, we developed a MATLAB-based graphical user interface, enabling users to simulate and visualize diffraction patterns in both one and two dimensions. This interactive tool enhances the study of Rayleigh’s criterion by comparing simulated diffraction patterns with experimental results, offering an accessible educational approach.