I thought this might be a logical place to piggyback a related but much more involved approximate astronomical calculation. I was pretty disappointed in the implementtion examples that I found for this too, and went digging once again. You may find that this rendition works for you either as is or with some tweaking.
SunRS
SunRS.cls is a VB6 class that accepts latitude and longitude as input properties, and then a method call supplying a date. The call will calculate sunrise, sunset, solar noon, and the day length which can be retrieved as output properties.
Background
There doesn't seem to be a concise description anywhere of the calculations required to accomplish this. The few descriptions I've seen express the process in terms of several calculations of intermediate values to be used, along with some description of those. Perhaps this is to help justify the "correctness" or perhaps to help educate people instead of providing a blind copy/paste "answer."
I chose to base my implementation on the description found in Sunrise equation. The code as written tries to stay very close to the description there calculation by calculation.
I even used the same corrections for the oddities involved:
"Dip."
Atmospheric refraction.
Observer elevation.
Width of the apparent solar disk (disc if you like).
Deviation
Even so there seems little agreement on the "fudge factors" to be used. There are even multiple definitions such as "legal sunrise" or "nautical sunrise" and so on.
If you need to perform those compensations or get more elaborate about the general compensation factors I suggest you do more research. As it is the values I'm getting appear adequate for my own purposes.