* 270g flour: 65¢
* 6g baking powder: 10¢
* 3g baking soda: 1¢
* 4.5g salt: 1¢
* 64g cocoa: $1.15
* 354g sugar: 90¢
* 113g butter: $1.42
We'll skip the vanilla, milk and coffee in the KA recipe on the view that we're substituting for Betty Crocker cakes here, which aren't likely to have coffee and vanilla extract in them.
Both recipes require the baker to supply eggs and oil. KA wants less oil but one additional egg, the BC box mix wants more oil but one less egg. Calling it a wash here.
So the total cost for our home made cake, using just the portion of the ingredients that you (should) already have at home is: $4.24, over 2x the box mix. Even if you take out the chocolate and go for a plain vanilla cake, you're still taking $3.09. That KA recipe might taste better (in fact, it probably does based on my experience with KA recipes). But I'm not sure it tastes so much better that I wouldn't rather save the time and dishes.
[1]: https://www.kingarthurbaking.com/recipes/chocolate-cake-reci... [2]: https://www.kingarthurbaking.com/learn/ingredient-weight-cha...