The real formula we used to order servers was more complex than this, and included regional distribution, requirement peaks etc. I can expand more on that process if this is interesting.
However, for the context of this post, this crude approximation suffices IMO