Abstract: Analyzing elemental composition is essential in optimizing the quality and quantity of food production. The effective utilization of an X-Ray Fluorescence Spectroscopy (XRF) Analyzer can be beneficial in identifying the effects of the amount of different elements and compounds on output measures. However, assuring the accurate reading of the XRF Analyzer reading in a different environment and measurement conditions such as time duration of the measurement, distance from the sample, the angle from the sample, and surrounding lighting are vital. The design of experiments with the goal of deviation from a set sample was used to assess the effectiveness of all environmental and measuring variables on the accuracy of the XRF Analyzer reading. 90 seconds measurement, 0 inches distance from the sample, and 0 degrees from the main axis provided the most accurate reading. The factor of the surrounding wavelength did not have a solid trend, but it was concluded that natural light and white color artificial light settings provided the most accurate measurement.