I did something similar myself, though with slightly different assumptions. Basically, I took the exp budget for a single medium encounter for one character (the budget multiplies for party size, so this scales easily to any sized group) and solved for how many such encounters it would take a character to reach each level (assuming they only gain exp from encounters and the exp of all their encounters over the course of that level average out to the medium value). Rounding to the nearest whole number of encounters, you get…So I was killing time with Excel (like you do) and decided to take the assumptions of D&D5E at face value and see about how long in game it should take for a character to level up. This is kind of a tangent off the D&D world demographics thread, but I didn't want to derail that thread, so here's a shiny new one for this.
My assumptions are:
1. The party is four adventurers.
2. One medium encounter is the party facing one solo monster of a CR equal to the party's level.
3. The adventuring day consists of the recommended 6-8 medium encounters.
According to pure math, with 6 medium encounter per day, it would take 143.28 days to go from 1st level to 20th level. At 7 medium encounters per day, 122.81 days from 1-20. At 8 medium encounters per day, 107.46 days from 1-20. As an example, the Mighty Nein, the PCs from Critical Role campaign 2, went from 1st level to 16th level in 327 days. This is the equivalent to about 1.7 encounters per day. The rest are: 1 enc/day, 859.65 days to 20; 2 enc/day, 505.68 days to 20; 2 enc/day, 429.83 days to 20; 3 enc/day, 286.55 days to 20; 4 enc/day, 214.91 days to 20; 5 enc/day, 171.93 days to 20; 6 enc/day, 143.28 days to 20; 6 enc/day, 122.81 days to 20; 8 enc/day, 107.46 days to 20.
Considering how hardy adventurers are and how the game mechanics are stacked in their favor, most people who start the life of an adventurer would survive...and in a rather short period of time, you'd have a world dirty with high level characters. The hiccup would be parties between levels 1st and 4th because they wouldn't have access to resurrection spells. Revivify comes online at 5th. If the party has a cleric, celestial sorcerer, or wildfire druid. Even if adventurers are so rare that there's only one adventuring party formed per year, you'd still get four 20th level characters every year. Unless you consider things like adventurers retiring. A few too many near death or actual death experiences and the character hangs up their bedroll. Or they set out to accomplish some specific task, did so, then retired. Or they were trying to get a certain amount of gold for some purpose, then called it quits.
ETA: Yeah, characters advance however often the DM wants. I don't bother with XP and just use story-based advancement. This is just a post about the game's math. Not how it "should" be done.