The article referenced above calculates the horizon distance, which is based on the curvature of the Earth's surface and would not necessarily be the same on your campaign world.
To find the horizon distance formula you need to use calculus. Briefly, you need to solve for where the tangent line to the circle curve intersects the Y axis at 1 + the height of the observer (relative to diameter). To find the arc length visible you use the following formula:
[90 - asin(1/(1+[h/R]))]*2R*pi/360= Visible arc length
That is, how far you'd need to walk to get to the horizon.
What you're doing there isn't calculus. It's mostly trigonometry with a little geometry and algebra thrown in.
Also, unless you are dealing with an extreme case (a very, very small planet, or a very, very high observer), you don't really need to worry about figuring out the arc length. Just figure out the length of the tangent line drawn from the horizon to the observer.
The secant tangent theorem gives the following equation...
d=√(h(D+h)), where d is the distance to the horizon, h is the height of the observer off the ground, and D is the diameter of the planet.
Now, for when the observer is close to sea level (close meaning anything less than low orbit) on a reasonably earth-sized planet, h is going to be very, very small compared to D (compare the earth's diameter of ~7,900 miles to the top of Mount Everest at ~5.5 miles above sea level). So, to simplify further, ignore the "+h" part...
d=√(hD)
That's it. It's not perfectly precise, but for what we're doing it's good enough (meaning within 1% accuracy).