Whether it’s a carton of spoiled milk or broccoli that’s been sitting in the back of the fridge for a bit too long, thousands of Canadians are often perplexed when it comes to figuring out when to keep or toss out old food.

Researchers in China are looking to take the guess work out of expiration dates by creating a new colour-coded smart tag that can detect whether foods and beverages have expired without even opening the container.

The tiny gel-like tag, the size of a corn kernel, would appear on food packaging and change colour depending on the freshness of the product over time.

"In our configuration, red, or reddish orange, would mean fresh," explained Dr. Chao Zhang, lead researcher of the study at Peking University in Beijing, China.

"Over time, the tag changes its colour to orange, yellow and later green, which indicates the food is spoiled."

The colours range from red, orange, yellow, green, blue and violet and signify different phases and stages of food expiration.

The range of freshness is set from “100 per cent fresh” to “100 per cent spoiled” and can even be applied to medicine.

The tags contain tiny metallic nanorods that react and change colour when exposed to different chemicals in the air.

For example, if a label says a product should remain fresh for 14 days under refrigeration, but the tag is now orange, that means the product is only roughly half as fresh.

In that case, the consumer would know the product is edible for only another seven days if kept refrigerated, explained Zhang.

The tags were first developed and tested using E. coli bacteria found in milk and can now be programmed to mimic almost all deterioration processes in foods.

Researchers presented the new technology at a meeting of the American Chemical Society on Monday and say the new tags would be relatively inexpensive to produce, costing less than one cent per tag.

Scientists say this new technology could help both retailers and customers better predict the expiration date of various products.

The tags are currently patented in China and while the technology is still in its early stages, Zhang is looking to meet with manufacturers interested in using the tags on their products.