Not sure if this is what you want, but there was a interesting discussion a few years ago: https://news.ycombinator.com/item?id=2348279 (read specially the first comment by patio11).
Thanks, this is a really good way to think about it. I think I also want to find a calculator or way to estimate based on market and revenue.