I recently decided to vibe-code a death calculator. A mega-Stoic maneuver by yours truly; contemplating death motivates me. When I sit down at my desk, I let myself be distracted some days easier than others. ‘DeathCalc’, as I called it, violently reminds me of my fleeting time on this earth with a countdown, but also comes with a button that summons an inspirational quote, and a small ‘reflect’ button that prompts a response, saving my answer to a timestamped growing text file. One day I’ll turn that file into something fun (retrospective sentiment analysis? A mood board? Something weirder??). Most importantly, it has a timer with a percentage bar showing how long I have left before I croak. It boots up automatically when I start my computer and looks like this:
Obviously no one can predict how and when they’ll die (that’s part of the fun!), and that’s the problem with living. We live as though we’ll live forever, and this can be a good and healthy thing. It nudges us to save money, cajoles us to exercise and look after our bodies, gives us pause before leaping out of an airplane. Researchers have found that a healthy relationship with ourselves involves doing things that, in the end, probabilistically prolong our lives. Even if we will die eventually, it’s actually healthy to eat vegetables and go for a run. I think it’s got something to do with the enervating energy of staving off entropy. “Not today Mephistopheles!” I shout as I burst out of my house for a jog. I think I even write as a way of transmogrifying my life force into something more enduring.
‘DeathCalc’ reveals something spooky, too. I have the percentage of life lived to two decimal points (at the time of writing, I have lived for 41.44% of my allotted span). Every two days or so, the decile ticks up a single digit. Two days. Even for a guy who writes about the importance of acknowledging death, it is a little rattling to see concrete evidence that I am constantly dying. Quantifying the terrifying brevity of life is one of the meanest mathematical tricks we play on ourselves. From Oliver Burkeman’s book 4000 Weeks (that’s how long your average lifespan is, I’ve already lived nearly 1700 of the fuckers) to Tim Urban’s heartbreaking blog “The Tail End”, to the astonishing fact that all of recorded human history is about twenty lives long (imagine twenty human beings holding hands in a chain - their lives stretch back to the birth of Jesus Christ), the math makes our emotions on the topic clear; we are bad at judging the measure of our mortality.
The measure of our mortality is the degree to which we know death is abundant, real, the other side of life’s coin. Our measure of mortality is the amount of times we tell people we love them, the number of times we prioritise experience over things, the number of days we seize. Seriously, pause reading right now and go read Tim’s blog (it’s mostly pictures anyway) - he argues we can put our lives into perspective by counting the number of events left in our lives. I actually cheated on my DeathCalc and assumed I’d live until 84 to compensate for unexpected accidents/disease. I secretly hope I live to at least 90. Given that, I eat pizza about once a month, so I have about 660 pizzas left to eat:
Not counting research, I read about 15 books a year. This means I can choose about 825 books to enjoy for the rest of my life (not including picture books because I ATE those up as a kid):
The measure of my mortality will be the degree to which I can enjoy each of these remaining treats. Pizza is my favorite food. I don’t want to be nibbling pizza #814 and worrying absent minded about taxes. I want to devour that bad boy like the doughy degenerate I am. I want the crust thin but crispy, able to hold its weight under the cheese, bubbly, chewy, slightly charred crust from the wood-fire it took ninety seconds to roast in, maxing out at four ingredients on top, and I want to be thanking God for having the foresight to birth me into a world with plentiful pizza options including this one.
And I’ll take this opportunity to bequeath/unload one of my favorite rants unto you; life is too short for shit books. The moment I let go of the need to finish books for a vague sense of satisfaction is when I started reading better books. A book, to paraphrase Seth Godin, is still a screaming bargain in this day , because contained within books are ideas that will change your life. TikTok won’t do that. This blog won’t do that. You need to follow an idea down to its root to actually understand it, and the only format you can buy for $20, take home with you and eat a pizza with it is a book. And it could change your life. If it isn’t grabbing you, move on. The world is full of smart people with great stories and ideas, and you don’t have many left to choose.
On a more sober note, I’ve already had 34 of the 84 Christmases I’ll get to enjoy:
Here’s the sadder side of the measure of your mortality; if you’re around thirty years old, you’ve probably already spent the vast majority of time you’re going to spend with, say, your parents. Your math may vary, but Tim calculates he’s spent 93% of his in-person parent-child time when he wrote that blog. I calculate I’ve spent 95% of the in-person time I’ll ever spend with both my parents. Ditto for many high school friends, and the number is only a bit smaller for my siblings. I don’t quite have the heart to make a calculator out of this one. Suddenly, these events put my own percentage bar into starker terms - it’s easy to contemplate one’s own death, but the real heartbreak of life is witnessing another’s fade away. That’s why the poets sing about heartbreak. Heartbreak is the currency of mortality’s measure, the marrow of love. It’s the realest shit there is.
This is the way you get a better measure of your mortality; what do you prioritise? Math, entropy, change are implacable. There is real, healthful joy in staving off the inevitable, but it is, after all, inevitable. The freedom lies in how you pay attention between the structure of these implacable forces. Enjoying pizza could be an ideal way to do this. More probable is in noticing the things you currently measure that are cumulative rather than finite. Money is the biblical example of this; you cannot predict how much money you will make over your lifetime. ‘Happiness’ also subtly falls into the same bucket - a feeling we chase but who’s end-of-life sum will always feel meager compared to the fullness with which we engaged with life, the counting of which is nonsensical and counterproductive. As I recall, Victor Frankel didn’t title his memoir about the holocaust “Man’s Search for Happiness.”
Money and happiness, in the end, are impossible to predict. All we can do is apply a directionality to events, decide what we pay attention to, all another way of saying ‘prioritise’. So, measure your mortality. Do some math. Write the good things down, the events you mark your life with. Keep that shit in mind, let it be your compass. It’s only scary if you insist on ignoring it, and if that’s the case, great news - you’re human, and you’ve got a little more digging to do.
Life is too short to a) read bad books and b) pretend you’re here forever. Live by Simone Weil’s advice; the greatest gift you can give the world is your attention, here and now.
BONUS:
Here’s my code for DeathCalc. Use ChatGPT to help you set it up! Install Pycharm to get it running:
import tkinter as tk
from tkinter import ttk, messagebox, simpledialog
from datetime import datetime
import random
import os
# ====== Configuration ======
birth_date = datetime(1990, 10, 19)
death_date = datetime(2074, 7, 27) #input your 'death date' here
milestones = [30, 50, 65]
# ====== Quotes ======
quotes = [
"It’s dark because you are trying too hard. Lightly child, lightly.",
"The trouble is, you think you have time. — Buddha",
"Routines can be a matter of life and death.",
"A simple rule for life that rarely fails: Optimize for enthusiasm. Make as many choices as you can that leave you feeling energetic and interested. Pay attention to when you have the urge to pursue or participate in something and do more of it.",
"There is an enormous difference between working hard on something that is a grind and working hard on something that comes easily to you. Exceptional results almost exclusively happen when you work hard on an area where you have some natural aptitude. Play to your strengths.",
"Education teaches you to analyze. Entrepreneurship teaches you to create. The educated mindset is great at dissecting and criticizing. What did Shakespeare mean here? What were the major forces of this historical period? What is the limiting reagent in this chemical reaction? The entrepreneurial mindset is great at building and improving. Design a better product. Craft a new marketing plan. Stop talking about what's wrong and make something better. The trick is to keep learning, but to never lose your ability to build."
]
# ====== Reflection Prompts ======
reflection_prompts = [
"What am I really trying to say with my writing today?",
"What would be a meaningful use of my next hour?",
"What fear is secretly running today’s show?",
"If I keep living like this, what will my life feel like in 5 years?",
"What matters more than the things I'm currently focused on?",
"Who am I becoming through my actions?",
"What would a deeply aligned version of me do today?",
"What needs to be said, but I’m avoiding writing?",
"How can I turn my discomfort into momentum?",
"What did today teach me about my life's purpose?"
]
reflection_log_path = "reflections_log.txt"
# ====== Reflection Function ======
def reflect():
prompt = random.choice(reflection_prompts)
response = simpledialog.askstring("Reflection Prompt", f"{prompt}\n\n(Your response below)")
if response:
timestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
log_entry = f"[{timestamp}] {prompt}\n{response}\n{'-'*50}\n"
with open(reflection_log_path, "a", encoding="utf-8") as file:
file.write(log_entry)
messagebox.showinfo("Saved", "📝 Your reflection has been saved.")
# ====== Countdown Function ======
def update_ui():
now = datetime.now()
remaining = death_date - now
lived = now - birth_date
total_lifespan = death_date - birth_date
if remaining.total_seconds() <= 0:
countdown_label.config(text="🎉 The countdown has ended!")
progress_label.config(text="100.0% of life lived")
progress_bar['value'] = 100
else:
days = remaining.days
hours, remainder = divmod(remaining.seconds, 3600)
minutes, seconds = divmod(remainder, 60)
countdown = f"{days}d {hours:02}h {minutes:02}m {seconds:02}s"
countdown_label.config(text=countdown)
percent_lived = (lived.total_seconds() / total_lifespan.total_seconds()) * 100
progress_label.config(text=f"{percent_lived:.2f}% of life lived")
progress_bar['value'] = percent_lived
root.after(1000, update_ui)
# ====== GUI Setup ======
root = tk.Tk()
root.title("DeathCalc")
root.geometry("460x290")
root.resizable(False, False)
# Countdown
countdown_label = tk.Label(root, text="", font=("Helvetica", 20))
countdown_label.pack(pady=10)
# Progress
progress_label = tk.Label(root, text="", font=("Helvetica", 14))
progress_label.pack()
# Milestone Canvas
canvas = tk.Canvas(root, width=320, height=40)
canvas.pack()
# Progress Bar
progress_bar = ttk.Progressbar(root, length=300, mode='determinate')
progress_bar.pack()
# Milestones
def draw_milestones():
canvas.delete("all")
canvas.create_line(10, 20, 310, 20, fill="gray", width=2)
for age in milestones:
percent = (age * 365.25 * 24 * 3600) / (death_date - birth_date).total_seconds()
x = 10 + percent * 300
canvas.create_line(x, 10, x, 30, fill="red")
canvas.create_text(x, 35, text=f"{age}", font=("Helvetica", 8))
draw_milestones()
# Buttons
button_frame = tk.Frame(root)
button_frame.pack(pady=10)
quote_button = tk.Button(button_frame, text="Inspire Me", command=show_quote)
quote_button.grid(row=0, column=0, padx=10)
reflect_button = tk.Button(button_frame, text="Reflect", command=reflect)
reflect_button.grid(row=0, column=1, padx=10)
# Start app
update_ui()
root.mainloop()
Share this post