Sparkfun using 500Ω resistor on circuit with 9V battery and 2V/0.018A LED
The LED, being a diode, doesn't have a linear current-voltage relation described by Ohm's Law. There will always be a relatively constant voltage drop over the diode, as soon as there is enough current. This voltage drop is dependent on the color of the LED and can be taken from the datasheet. The rest of the voltage will drop over the resistor, and that's the value you need to take to calculate the exact resistance needed. The sparkfun equation is simplified, assuming the complete voltage dropped over the resistor and will therefore yield a bigger resistor value and a smaller current. You don't need to run the LED at full current, so that's generally a good idea.