To calculate resistance values for a phototransistor circuit, use the formula R = (V - Vf) / I, where R is the resistor, V is the supply voltage, Vf is the LED voltage drop, and I is the LED current. The necessary values for Vf and I can be found in the provided datasheet. Selecting the correct resistor is crucial to limit the current to the desired level. This approach ensures the circuit operates safely and effectively. Proper calculations will enhance the performance of the phototransistor circuit.