How to tell if oil is rancid (and nuts and flour too)
How to recognize rancid cooking oil, nuts and whole grain flour, USDA FoodKeeper shelf life for common oils sealed and opened, and what official guidance says to do with rancid food.
The fastest way to tell if oil is rancid is to smell it. Fresh oil smells mild or like its source, such as olives or toasted sesame; rancid oil smells stale and unpleasant, the odor FDA describes as decomposed fat. Opened olive or vegetable oil keeps its quality for 3 to 5 months in the pantry, according to USDA.

Nuts and whole grain flour go rancid too, so one sniff test covers a good part of the pantry. Our printable pantry chart lists sealed and opened times for olive, vegetable and sesame oil alongside condiments, baking staples, canned goods, rice and pasta.
How do you tell if oil is rancid?
FDA's Food Defect Levels Handbook defines rancid as a disagreeable odor or taste of decomposed oils or fat. In your kitchen that comes down to three checks, and your nose does most of the work:
- Smell it straight from the bottle. Stale, musty or harsh means it has turned. If you have a fresh bottle, smell them side by side; the difference is usually obvious.
- Notice the food. Oil that's starting to go makes fried eggs, dressings and baked goods taste stale or bitter, even when the bottle smelled passable.
- Check the dates. A bottle opened more than a few months ago, or stored next to the stove, is the likeliest suspect.
How long does cooking oil last?
These pantry and fridge times for best quality come from USDA's FoodKeeper app.
| Oil | Sealed | After opening |
|---|---|---|
| Olive or vegetable oil | 6 to 12 months | 3 to 5 months in the pantry, or 4 months in the fridge |
| Canola, sunflower or grapeseed oil | 1 year | Not listed |
| Nut oils | 6 to 12 months | 3 to 8 months in the pantry, or 6 to 8 months in the fridge |
| Sesame oil | 2 years | 6 months |
| Avocado oil | 2 years | 6 months |
| Coconut oil | 3 years | FoodKeeper doesn't recommend the fridge, because it gets hard to use |
| Vegetable oil spray | 2 years | 1 year |
| Solid shortening | 1 to 2 years | 6 to 12 months |
| Reused frying oil | Not listed | 1 month in the fridge, or 6 to 9 months in the freezer |
The opened times are the ones that catch people out. A big bottle of olive oil that's used a spoonful at a time can easily be open for a year.
Rancid nuts and flour
Nuts go rancid the same way, and FDA's handbook describes what that looks like: rancid nuts are often soft, with a yellow, dark or oily appearance, a bitter taste and a stale odor. Shelled walnuts and pecans keep only 2 to 4 weeks in the pantry in FoodKeeper, but 9 months or more in the fridge, so the fridge or freezer is the place for nuts you won't eat soon. The mixed nuts storage page has more on that.
Whole grain flour turns sooner than white flour. FoodKeeper gives whole wheat flour 3 to 6 months in the pantry and 6 to 8 months in the fridge, against 6 to 12 months for sealed white flour. Stone-ground cornmeal gets only about a month in the pantry and 2 to 4 months in the fridge. If flour smells stale, sour or musty, bake with a fresh bag; our guide to whether you can use expired flour covers the rest.
Questions about rancid oil
Can you get sick from rancid oil?
The government guidance we checked doesn't give a simple yes or no on illness, but it's clear about what to do. The USDA FSIS freezing guide says food that develops a rancid or off odor should be discarded, and the FSIS guide to food product dating says food that has developed an off odor, flavor or texture should not be eaten. Treat rancid oil the same way and throw it out.
What happens if you use expired oil to cook?
It depends on whether the oil has turned. Oil is a shelf-stable food, and FSIS says the date on a shelf-stable product is about quality, so oil a little past its best-by date that still smells fresh can be used. If it smells rancid, the dish will pick up that stale, bitter taste, and FSIS's advice above applies: don't eat it. Our guide to what best-by dates really mean explains the different label dates.
How to store oil so it lasts
- Keep it away from heat. FSIS says shelf-stable food shouldn't be stored above or beside the stove, and that temperatures below 85°F are best. A cupboard away from the range beats the handy shelf next to it.
- Close the cap after every use.
- Buy the size you'll finish within the opened time in the table, even if the big bottle costs less per ounce.
- Refrigerate olive or vegetable oil after opening if you use it slowly. FoodKeeper gives it 4 months in the fridge once opened.
- Strain reused frying oil, cover it and keep it in the fridge or freezer.
When in doubt, throw it out
If oil, nuts or flour smell stale, bitter or musty, throw them out. When in doubt, throw it out; a new bottle costs less than a dish that tastes off.
Know when you opened it
It's hard to remember when a bottle was opened. Well Stockd keeps your pantry, fridge and freezer in one list. Type a date on the oil, either the best-by date from the label or the date you want to finish it by, and Well Stockd keeps that date, sorts the oil with everything else by what to use first and sends a reminder as the date comes up. For more staples that outlast their labels, see which pantry foods last past their expiration date.
Print the pantry chart
The printable pantry chart has sealed and opened times for oils and the rest of the pantry on one letter-size page. The printable freezer chart and the printable fridge chart cover the other two places food goes, and our printable food shelf life chart guide explains how they work together.