The formulas in the first calculator above assume a steady voltage, but in reality, a battery will have three voltage states: fully charged voltage, nominal voltage, and discharged voltage. For instance, if you are using a 4s lipo pack, these voltages will be 16.8v (4.2v/cell), 14.8v (3.7v/cell), and 12v (3.0v/cell), respectively. If a resistor is chosen based on the nominal value, the LED will be brighter when hooked to a fully charged battery, and dimmer when the battery is nearly discharged.
This can be fixed by the use of a linear voltage regulator. This would keep the output voltage constant no matter the battery charge level. So, if a 5v regulator is used on a 3s lipo pack, the output will remain a constant 5v even though the battery will fluctuate from 12.6v down to around 9v.
RadioShack carries two inexpensive versions; the LM7805 (5v) and the LM7812 (12v). The LM7805 would be used if using battery voltages between 2s-4s lipo (6-12 NiMH cells). The LM7812 would be used with 5s lipo (15 NiMH cells) or higher. The idea is to choose a regulator whose output is at least 1.5v higher than the minimum battery voltage.
Below is a simple schematic diagram showing how to hook up one of these regulators:
FYI: Any of the regulators listed above can technically be used wired to have adjustable outputs. Two extra resistors would be required to "program" the voltage. However, this is beyond the scope of this page, and one of the LM78xx series regulators will work fine in 99% of the cases.