How is USB power (5V) enough to drive Arduino Mega 2560?

Looks like Arduino Mega 2560 works just fine when powered through USB that is connected to a PC.

However, I am a little confused on how exactly does this work. According to the board specifications, the input voltage required is 7-12V. As I understand, USB can provide only 5V output.

Can someone please clear this simple confusion?

Regards, Peter

The 7-12V input refers to power coming in via the 2.1mm DC socket, which is then run through a 5V regulator. The microcontroller itself runs on +5V.

Just adding that on-board 5V regulator need at least little bit higher voltage than 5V to be able to produce 5V, plus there is protection diode which needs additional cca 0.7V so the working voltage starts approximately at 6.5V, more reliable 7V. This is low boundary. High boundary of voltage depends on what the regulator can withstands. Higher voltage can destroy the regulator. USB port on the computer has its own 5V power supply which is according requirements of Arduino MCU so it can be used directly without further regulation.

BTW, you can have safely connected both. Power source is switched automatically, first from barrel jack. You can disconnect one without interrupting the power.