Yes there's an app for that. You can calculate the amount of weeks you have left to live, that is you live until your anticipated life expectancy runs out. Is this a maudlin way to go through life? No. It teaches you what's important about living your life on your own terms before you die.
It reminds me of that Les Edgerton short story- it's in Monday's Meals - about a kid counting down his breath until he dies.