The Java calculator below can be used to solve the unknowns associated with the voltage divider at the right. The output at "Vout" represents the voltage across the resistor R2. For example, to determine the resistors needed to produce 5 volts at "Vout" from a 12 volt source supplying 1 milliamp, the value 12 would be entered in the "Battery Voltage" field, .001 in the "Current" field, and 5 in the "V out" field. The result should be 7000 and 5000 ohms for R1 and R2. To find the series resistance needed for a 2 volt LED operating from a 12 volt battery at 20 milliamps, the values 12 for the battery, .02 for the current, and 2 for Vout would be entered and the LED would represented by R2. The result should be 500 ohms for the series resistance R1. The calculator can also work problems based on power dissapation. For example, to find the series resistance needed for a 5.1 volt zener diode operating at 1/8 watt from a 15 volt supply, the value 0.125 is entered in the "Power R2" field, 5.1 in the Vout field, and 15 in the battery voltage field. The result should be about 404 ohms for the series resistor R1.