One example of this calculation is QALYs (Quality Adjusted Life Years) which is used in the UK to determine what drugs are worthwhile: https://www.nice.org.uk/news/articles/changes-to-nice-s-cost...