What is the formula for how far a sound can be heard (taking into account dissipation)? I was trying to figure out how far can a sound of 103 dB can be heard, so I converted it in W/m$^2$ (it gave me about $0.0200$ W/m$^2$) and then I used the formula “$I=P/4\pi r^2$” to find the maximum distance the sound can be heard, thus replacing the I of the equation by $10^{-12}$ W/m$^2$, so that I would have 10$^{-12}=0.0200/4πr^2$.
Problem is, it gave me about $39894.23$ meters for $r$ - which means almost 40 km, and obviously that makes no sense. Apparently that’s because I didn’t take into account the dissipation of the sound due to the atmosphere- but how can I do that? How can I know the rate of sound dissipation, and how can I integrate it into the formula to find the level of sound according to the distance from the source, so that I get more accurate results?
 A: Well, Niels Nielsen gave some good insight on the concept in their comments.
First of all, keep in mind that you are working on a purely theoretical basis here since you have used some formulas for ideal cases.
Next, please note that you assume a point source, which is a valid assumption for large distances. In case you would like to include transmission losses you could either use some indicated values for the attenuation per distance (like those found here for attenuation per kilometre) or try to model the dissipation mechanisms (you can find some information on this here) and include them in the formula you have used.
One note here is that for you to be able to do that you would have to use the formula for the pressure of the point source. This could very well ease the calculations. Due to spherical radiation, you can just use the $\frac{1}{r^{2}}$ factor to find out at which distance you will reach the hearing threshold. For this latter part, you could either the $20 ~ \mu Pa$ value (which is used as a reference for SPL calculations) or consult the Fletcher & Munson curves (or equal loudness contours) for the hearing threshold of each frequency.
What you should keep in mind is that the attenuation through most (if not all) media (air included) is frequency-dependent and for this reason alone you should specify the radiated frequency (and in case you are interested in broadband radiation you should solve for each frequency, or band of frequencies, separately).
If you consider the formula given in the first link
$\alpha r = -20 \log_{10} \left(e^{-\beta r} \right)$
you can solve for $\beta$ by using values for $\alpha$ from the tables in the same link. For example, if $\alpha$ is 1.82 then you get for $\beta$
$1.82 r = -20 \log_{10} \left( e^{-\beta r} \right) \implies 1.82 r = 20 \beta r \log_{10} \left( e \right) \implies \frac{1.82}{20 \log_{10} \left( e \right)} = \beta \implies \frac{1.82}{20 \cdot 0.4343} \approx \beta \implies \beta \approx 0.21$
From there you could add the factor $e^{-0.21 r}$ to the $\frac{1}{r^{2}}$ factor and then solve for the distance $r$ that will give you the desired pressure value.
A more general formulation would require thorough and complex analysis in order to incorporate all the loss mechanisms in such a way that will allow you to have a direct relation to distance (in order to solve for it in the end).
Regarding the inclusion of buildings... This would most probably require some statistical approach as you cannot really formulate each reflection, the diffraction and all other wave phenomena in a closed-form analytical solution, especially if "arbitrary" geometries (like building in cities, trees in forested areas, etc.) are involved.
One most probably more feasible and a possibly better approach would be to numerically solve for such cases. This is in fact what commercial software such as Olive Tree Lab, or NoizCalc do (with the second being less accurate since it is developed by an electroacoustics company) in order to provide some insight on what the resulting sound pressure levels at quite large distances from sources would be.
