An electronic device with power output function includes an interface for connecting with an external power supply or a small electronic device. The electronic device further includes a battery, a boost circuit, a switch circuit, and a charging circuit. When the external power supply is connected to the electronic device through a first cable, the switch circuit is closed to allow the external power supply to charge the battery through the first cable, the interface, the switch circuit, and the charging circuit. When the small electronic device is connected to the electronic device through a second cable, the boost circuit is enabled to boost the power voltage of the battery to allow the battery to charge the small electronic device through the boost circuit, the interface, and the second cable.