You’re pretty close for a 0w20 / 5w20 / 5w30 full synthetic.
When you get into the more exotic - 0w8 / 0w16, 0w30 / 0w40 / 5w40 - it gets significantly more expensive. Because there’s less of the base oils and the additive package used. There is a huge economy of scale for the “standard” products of 0w20 to 5w30. Because there’s just so many gallons there.
In the big picture of things, once you go out of those grades, the economy of scale falls off quickly. And things get much, much more expensive to produce. My napkin maff

without giving away too much publicly, you’re off by about double on 0w40. Different base oils, different additives, different tankage, packaging lines, etc.
If 0w40 got as popular as say… 5w30, it would certainly drop in price. But 0w20 to 5w30 outsells 0w40, by about 100,000 gallons to 1. (Again, napkin maff. It’s a lot. There’s very little demand for 0w40.)