The entry point I'm using is StandardWildEncounter() in src/wild_encounter.c if you'd like to follow along. Hey, cool, you stuck around! Let's get into it. There are a bunch of modifiers to these figures, though, so read on if you care about those. If all you care about is the final encounter rate, it's 11% for most outdoor land areas like tall grass and desert sand, 6% for most caves and the like, and 2.2% when Surfing. Let's read some 16-year-old C code! TL DR I can read code, I'm stuck inside indefinitely due to a global catastrophe, and I need something to do. That's when I stumbled upon a GitHub project that hosts a disassembly of Pokémon Emerald. Not even on Bulbapedia, a Pokémon wiki with ridiculously detailed documentation of every last aspect of every game. It was way higher than I remembered as a wee elementary school kid, but I couldn't find any hard data on how the encounter rate was determined.
I was playing through Pokémon Emerald recently, but got really turned off by the sheer volume of random encounters.