Thresholding is an important data reduction technique used to eliminate unwanted information, and is commonly used in applications such as particle detection for lab-on-a-chip systems. This work presents a novel optical comparator which incorporates a photosensitive area into a five transistor comparator to perform thresholding. The optically active area is formed by enlarging the drain substrate p-n junction of each of the cross coupled NMOS transistors, and exposing one of them to the light, while shielding the other with metal for symmetry and dark current suppression. The cross-coupled NMOS transistors provide positive feedback to enhance detection speed and latch the result, while the PMOS input transistors provide a biasing mechanism to set an optical threshold. The device was fabricated and tested in a commercially available 3-metal 2-poly CMOS process. Results show that the device can reliably discriminate an optical signal of power on the order of the defined threshold.