The ranges that you see in the database is set by the database admins, though I don't know if they use a specific formula. That range setting, pus the range you set on your scanner, has very little to do with the actual range that you can hear that agency, The database & scanner ranges are used to determine whether or not that channel, site, whatever, is enabled if you are using location control on either the main database, or in one of your Favorites lists, I have a number of systems that, based solely on database range, plus the range setting in the scanner, these woulkd be 'out of range & therefore not scanned. For that reason, among others, I use Favorites lists that I've created, which include systems, sites, & departments that I know I can hear. I don't use location control.
The range at which a given channel, such as the jail you mention, is enabled is based (when location control is in use) is actually the sum of the channel's range (Department, Site, whatever). So if you use a 10 mile range, and that channel shows a ten mile range, it would be enabled & scanned whenever you are wiyhin 20 miles of it. Basically, if you drew a range circle on the map for that channel, and another centered on where your scanner is, based on your range setting, that channel would be active at any point where those two circles intersect.
See if this helps:
How it Works: Location, Location, Location