Compare the amount you’ll put in the pan. Say a bag of diced onion costs $2.40 and contains two cups. A whole onion costs $1 and gives you the one cup your recipe needs. If you only need that cup this week, the whole onion costs less at checkout. If chopping is the step that would send you back to takeout, the prepared bag may still earn its place.
Ask whoever shares the cooking, “Would you use the other cup, and in which meal?” Give it a purpose before counting it as savings.
Search your grocery store for “diced onion” and “whole onion.” Compare the package size, the price, and the prep time that matters on your busiest night.