Pupillary reflex has been used as a method to examine psychological problems in human clinics and mental disease research. Intensive animal farming has been shown to lead to chronic stress resulting in depression; however, comparing with humans we lack an effective clinical method to clinically inspect these psychological problems in animals. The goal of this study was to investigate the effect of age and housing conditions (confined crates vs. group pens) on pupillary light reflex (PLR) of sows to explore whether PLR can be used as an effective way to measure the psychological state of farm animals. In total, 270 pregnant sows were selected for PLR testing and divided into 6 treatments (45 sows per treatment) of 2 different environments (group-housed pen and confined gestation crates) and 3 parities (first, third, and fifth parities). Six selected pupil parameters: 1) latency of the pupil constriction onset (LAT); 2) the percent of the constriction (CON); 3) average constriction velocity (ACV); 4) maximum constriction velocity (MCV); 5) average dilation velocity (ADV); and 6) time of 75% recovery after constriction (T75) were examined. The results showed that there was no difference found in these PLR parameters between the breeds (P > 0.05) but the significant effects were found on LAT, CON, ACV, and MCV by age (P < 0.01). The group-housed sows had significantly higher CON, ACV, and MCV than those in the confined crates (P < 0.05). In conclusion, the pupillary light reflex of the sows was not affected by breed but by age. The results also indicate that some of PLR parameters were sensitive to housing conditions and suggest that ACV and MCV have potential to be sensitive indicators in relation to the psychological problem of sows.