Uncooked white rice can last up to 4-5 years when stored in an airtight container away from moisture and direct sunlight. Brown rice has natural oils that make it more vulnerable to spoilage; hence it only lasts for 6-8 months under similar storage conditions. Refrigerate rice within two hours after cooking; otherwise, bacteria may grow and cause food poisoning. Once refrigerated, cooked rice can last for three days before going bad.