Aflatoxins are considered a potential hazard to public health, due to their toxicity and carcinogenicity. Under favorable environmental conditions, insect attack, and substrate, aflatoxin-producing fungal species can grow in certain foods and feeds. The total aflatoxin distribution due to environmental conditions (temperature, relative humidity, and rainfall), collection phase (early, middle, and late), microbiological analysis of aflatoxin-producing strains, and nutrients (minerals, moisture, and carbohydrates) was evaluated in samples of corn grown in Costa Rica. A multiple regression analysis design determined that total aflatoxin levels were significantly correlated (p less than or equal to 0.05) with the presence of Aspergillus flavus in the grain and temperature conditions. Levels of aflatoxin were highly correlated (p less than or equal to 0.01) among minerals (Mg2+, Zn2+, and Ca2+) and the polynomial effect of their interactions. Collection phase had a significant effect on aflatoxin levels (p less than or equal to 0.05) due to differences in harvest and storage conditions, as well as agricultural practices in each region. Also, the effect of xylose, fructose, and glucose/mannose content in corn grain on the level of aflatoxin was not significant (p less than or equal to 0.05). However, glucose/mannose had an effect of multicollinearity.