Keep cooking oil tightly closed in a cool, dark cupboard, away from the stove and sunlight. Most opened oils keep their best quality for about 3 to 6 months; the USDA FoodKeeper gives olive and vegetable oil 3 to 5 months after opening. Nut and seed oils like sesame and walnut do better in the fridge. Used frying oil: strain it, store it sealed and dark, and throw it out once it’s cloudy, foamy or smells bad (USDA). And keep homemade garlic oil in the fridge and use it within 2 to 4 days.

Reusing frying oil? A fine strainer makes it easy: fine mesh oil strainers (Amazon; as an Amazon Associate I earn from qualifying purchases)

How Long Does Cooking Oil Last?

OilUnopenedAfter openingWhere
Olive oil, vegetable oil6 to 12 months3 to 5 monthsPantry (4 months in the fridge)
Canola, sunflower, grapeseed1 yearCanola: up to 6 months (Ohio State)Pantry
Nut oils (walnut etc.)6 to 12 months3 to 8 months in the pantry; 6 to 8 in the fridgeOhio State: walnut oil in the fridge
Sesame oil2 years6 months in the pantryOhio State: fridge after opening
Avocado oil2 years6 monthsPantry
Coconut oil3 years in the pantryPantry; the FoodKeeper says the fridge isn’t recommended (it gets hard to use)
Shortening (solid)1 to 2 years6 to 12 monthsPantry
Cooking spray2 years1 yearPantry

Source: USDA FoodKeeper, unless noted. These are best-quality times. Ohio State gives opened olive oil 3 months and most other opened oils up to 6 months.

Does Cooking Oil Go Bad?

Oil doesn’t grow mold like bread, but it does go rancid: the fats slowly react with air, and heat and light speed that up (my explanation). Rancid oil tastes stale, bitter or “painty” and spoils whatever you cook with it (my description), so when in doubt, throw it out (my advice).

The sniff test: pour a little in a spoon and smell it. Fresh oil smells mild or of its source (olives, nuts). A sharp, crayon-like, fishy or paint-like smell means rancid (my description).

How to Store Cooking Oil

  1. Dark and cool: Ohio State University Extension says to keep olive oil in a dark pantry or cupboard, away from sunlight. Not next to the stove or oven (my advice).
  2. Cap on tight after every use, so less air gets in (my advice).
  3. Pantry or fridge: Ohio State says canola, corn, peanut and vegetable oil go in the pantry, while sesame and walnut oil go in the refrigerator.
  4. Olive oil in the fridge? It’s allowed (FoodKeeper: 4 months after opening), but it turns cloudy and thick in the cold and clears again at room temperature (my description); the pantry is easier (my advice).
  5. Buy the size you’ll use within a few months of opening (my advice). A huge bottle of olive oil that lasts a year will be past its best long before the end.

How to Store Used Frying Oil

The USDA’s deep fat frying fact sheet gives clear steps for reusing oil:

  1. Let it cool, then strain it through a cheesecloth or sieve to remove food bits.
  2. Store it in a sealed, light-proof container. The USDA says up to 3 months, and refrigerated for best quality. The FoodKeeper is stricter: 1 month in the fridge, or 6 to 9 months in the freezer. I’d follow the FoodKeeper (my advice).
  3. Throw it out if it’s cloudy, starts to foam, or has a foul odor, taste or smell (USDA).

Getting rid of it: the USDA says to pour it into a sealable container such as a coffee can or milk jug and put it in the trash, or take it to a recycling drop-off if your area has one. Not down the sink: the USDA says oil congeals in the drain and causes backups.

Homemade Garlic Oil and Herb Oil: A Safety Warning

Penn State Extension warns that oils flavored with fresh garlic or fresh herbs can cause botulism. Its advice:

  • Refrigerate homemade oil with fresh garlic or herbs and use it within 2 to 4 days. Don’t keep it at room temperature. (Penn State describes a separate acidified method for that; follow their instructions exactly if you use it.)
  • Dried herbs in refrigerated oil keep up to three months.
  • Store-bought infused oils are a different product: Penn State says to check the label for “acidified” or other microbial inhibitors.

Cooking Oil Questions

How long does cooking oil last after opening?

The USDA FoodKeeper gives olive and vegetable oil 3 to 5 months after opening in the pantry; Ohio State gives most opened oils up to 6 months and opened olive oil 3 months. These are best-quality times.

Should cooking oil be refrigerated?

Most don’t need it. Ohio State says canola, corn, peanut and vegetable oil belong in the pantry, while sesame and walnut oil go in the refrigerator. The FoodKeeper does not recommend the fridge for coconut oil.

How do you store used frying oil?

Strain it through a cheesecloth or sieve and store it in a sealed, light-proof container, refrigerated for best quality (USDA). The FoodKeeper gives reused frying oil 1 month in the fridge or 6 to 9 months in the freezer. Throw it out if it’s cloudy, foams or smells bad.

How long is homemade garlic oil good for?

Penn State Extension says to refrigerate oil with fresh garlic or herbs and use it within 2 to 4 days, because of the risk of botulism.

How can you tell if oil is rancid?

Smell it. A sharp, bitter, crayon-like or paint-like smell means it has gone rancid (my description). Rancid oil spoils the taste of food, so it’s best thrown out.

Sources & Transparency

Storage times: USDA FoodKeeper. Pantry or fridge, olive oil: Ohio State University Extension, “Pantry Food Storage” (HYG-5401). Used frying oil: USDA FSIS, “Deep Fat Frying and Food Safety”. Garlic and herb oils: Penn State Extension, “How to Safely Make Infused Oils” (2024). Tips marked as mine are my own advice.

Last updated:

Marleen van der Zijl, author of FreshStorageTips.com

About the author: Marleen van der Zijl

Marleen’s journey into food storage began with a simple goal: to stop wasting food and money. She believes a well-organized kitchen and smart storage habits can transform your life, leading to fresher meals and bigger savings.