If the Hanukah candles burned out within a half-hour after they were lit, they do not need to be relit, but the remaining oil is considered hallowed, as it had been designated for this Misva. As such, it may not be discarded, and it may not be used for personal benefit. The best option in such a case is simply to use the leftover oil the following night. However, if this happens on the last night of Hanukah, this is, quite obviously, not an option. And, as the Mishna Berura (Rav Yisrael Meir Kagan of Radin, 1839-1933) writes, the oil should not be kept until the following year, because it is likely that in the interim one will end up using this oil for personal benefit. Therefore, the leftover oil in such a case should be burned.
If the Hanukah candles were extinguished after a half-hour – the minimum-required time that the candles must burn – then in principle, this oil is not sacred, and may be used or discarded, since it was extra, and was not needed for the Misva. However, the Mishna Berura cites those who maintain that unless one made a stipulation to this effect, it is assumed that his intention was to designate all the oil poured into the lamps for the Misva, and so even if the candles burned for more than a half-hour, the leftover oil is forbidden for use. Therefore, it is recommended when pouring oi into the lamps to stipulate that one has intention to designate for the Misa only the oil that is needed to sustain the flames for the required duration of a half-hour. Hacham Ovadia Yosef goes even further, advising one to stipulate that only the oil that will actually burn should be endowed with sanctity. This way, regardless of when the candles extinguish, the leftover oil has no sanctity and is entirely permissible for use.
Another option is to add regular oil to the leftover Hanukah oil until the Hanukah oil constitutes one-sixtieth or less of the entire mixture, such that it becomes Halachically nullified. Once the forbidden oil comprises one-sixtieth or less of the mixture, the mixture is permissible for use. Normally, the rule of “En Mebatlin Issur Le’chatehila” forbids knowingly combining a forbidden substance with a majority permissible substance in order to render it Halachically nullified. However, the Shulhan Aruch (Yoreh De’a 99) writes that this rule applies only to substances which are forbidden on the level of Torah law, not to those which are forbidden Mi’de’rabbanan – by force of Rabbinic enactment. The Poskim therefore conclude that since the prohibition against deriving personal benefit from the oil of Hanukah candles applies only Mi’de’rabbanan, one may combine it with a large amount of permissible oil in order to avoid this prohibition. Interestingly, in discussing the laws of Hanukah (Orah Haim 677:4), the Shulhan Aruch writes that some authorities forbid mixing the leftover oil with permissible oil to avoid the prohibition. However, the Peri Hadash (Rav Hizkiya Da Silva, 1659-1698) clarifies that the Shulhan Aruch does not actually follow this opinion, as indicated by his explicit ruling in Yoreh De’a where he distinguished between Torah prohibitions and Rabbinic prohibitions, as discussed.
As for the oil left over in the bottle that one purchased for Hanukah candle lighting, Hacham Ovadia Yosef ruled that this oil is not considered sacred at all, and may be used for one’s personal benefit. It often happens that a person purchases an entire bottle of oil for Hanukah, but ends up using only half the bottle. In such a case, the remaining oil is entirely permissible. Hacham Ovadia draws proof from the ruling of the Magen Abraham (Rav Abraham Gombiner, 1633-1683) concerning the case of a person who filled the oil cups for the Hanukah candle lighting, but then decided to use different lamps and ended up not using this oil which he had poured into the lamps. The Magen Abraham rules that this oil is permissible for ordinary use, since it was never actually kindled for the Hanukah lighting. If so, Hacham Ovadia reasons, then certainly oil that never left the bottle does not become forbidden, even if the bottle was purchased specifically for lighting the Hanukah candles.
The Halachic scholars address the question of why this issue arises in regard to the oil of the Hanukah candles, but not in regard to the Sechach after Sukkot. At the conclusion of Sukkot, the materials used for Sechach have no prohibited status at all, and may be freely used or discarded, as opposed to the leftover oil of the Hanukah lights, which, as discussed, is forbidden if the light is extinguished before a half-hour. The simple answer is that when one places Sechach on his Sukka, his intention, quite obviously, is to designate this material for the Misva only for the duration of Sukkot. After the holiday, therefore, the Sechah is entirely permissible. The Hanukah candles, however, are intended to burn for a half-hour, and the oil is poured with this purpose in mind. As such, if the candles extinguish before a half-hour, the oil remains forbidden for use.
It must be emphasized that even in situations where the oil may be discarded or used, the wicks should be burned.
Interestingly, the work Ner Siyon writes that burning the leftover oil from the Hanukah candles is a Segula to protect against being murdered throughout the coming year.
Summary: Leftover oil in the lamps of the Hanukah Menorah may not be discarded or used for personal benefit, though it may be used for the next night’s lighting. However, one may circumvent this prohibition by stipulating when filling the oil lamps that he designates the oil for the Misva only for the duration of the time that the candles burn. Alternatively, one may mix the oil with an amount of oil sixty times the amount of the forbidden oil, and then the entire mixture is permissible. The oil leftover in the bottle is entirely permissible, even if the bottle was purchased specifically for the sake of the Hanukah candles.