How Do Solar Panels Make Electricity?
Sunlight can push electrons through a silicon cell to make an electric current. Here is what happens inside a solar panel, step by step, and why an inverter is needed.
Put a solar calculator in a bright window and its display comes on. A rooftop solar system works on the same basic idea on a much larger scale: light goes in, and electricity comes out. How does that happen?
The short answer: A solar cell is made from silicon, a semiconductor that can absorb sunlight.[1] Absorbed light creates pairs of electrons and holes, and the cell’s p-n junction pushes them apart so they flow as an electric current.[2]
Sunlight gives electrons energy
A solar cell contains a semiconductor material that can absorb sunlight and convert it to electricity. When the light is absorbed, its energy is transferred to negatively charged particles in the material, called electrons.[1] Those electrons then flow through the material as an electric current.[1]
The process starts when light is absorbed. PVEducation describes it as “the absorption of incident photons to create electron-hole pairs.”[2] Silicon is the material most often used. In the words of the US Department of Energy, “Silicon is, by far, the most common semiconductor material used in solar cells.”[1]
Inside the cell: the p-n junction
A solar cell is built from two differently treated layers of silicon. Atoms with one more valence electron than silicon are used to produce “n-type” semiconductor material, and atoms with one less valence electron result in “p-type” material.[3]
In the p-type material, PVEducation labels the gaps as “Missing Electrons (Holes)”. It explains that “The net result is a hole, as not enough electrons are present to form the 4 covalent bonds surrounding the atoms.”[3]
When the two layers meet, the junction does the sorting. “Electrons diffuse from the n-type side to the p-type side,” and holes flow the other way.[4] Carriers that cross the junction leave fixed charges behind, and those exposed charges create an electric field across the junction.[4] That field separates the electron-hole pairs made by sunlight, so the carriers flow as a current.[2] The diagram shows the idea in a simplified way.

Electrons become a current
Each cell has thin metal contacts on its surface. The DOE describes them as “the grid-like lines on a solar cell”. The current flows through these lines and then travels to an inverter.[5]
From DC to AC
A solar panel produces direct current (DC). Homes and the electricity grid use alternating current (AC). The DOE describes the inverter as the device that “converts direct current (DC) electricity, which is what a solar panel generates, to alternating current (AC) electricity”.[6]

How well do panels work?
Not all of the sunlight that reaches a panel becomes electricity. The best panels for commercial use have efficiencies around 18% to 22%. The maximum theoretical efficiency for a silicon solar cell is about 32%.[5]
Solar in Australia
Australia has a large number of small-scale solar systems. The Clean Energy Regulator’s postcode data, current as at 30 September 2026, lists 4,562,198 deemed solar PV systems for installation years 2001 to 2026.[7]

Safety first: electricity. Never open, touch or repair a solar panel, inverter, cable or electrical box. Work on solar systems should be done by a licensed electrician. Never look directly at the Sun, even through a window or sunglasses.
Try it: a solar calculator
Some calculators have a small solar strip beside the display. This activity is a safe way to see the strip respond to light.
You need: a small solar calculator, a sunny window and a timer.
- Stand near a bright window and switch the calculator on. Note what the display shows.
- Slide a sheet of paper over the solar strip so the light cannot reach it. What happens to the display?
- Move the calculator into dimmer light, such as a shaded corner. Does the display change?
What to expect: The display may stop or dim when the panel is covered. Some calculators have a backup battery, so check the instructions before you decide what you have seen.
Safety first: Do not take the calculator apart, and never look directly at the Sun. Keep batteries away from small children.
Go deeper: DC, AC and the physics
Why the inverter matters
A solar panel’s output is direct current, but the grid uses alternating current. The DOE says an inverter converts DC to AC, which is the form the grid uses.[6]
What the junction does
The junction is where the work happens. PVEducation says that “The carriers are separated by the action of the electric field existing at the p-n junction.”[2] That separation is what lets the light-generated carriers flow through an external circuit as current.[2]
Frequently asked questions
Does a solar cell need light?
Yes. A solar cell absorbs sunlight, and the light’s energy is passed to electrons in the cell.[1]
What is a semiconductor?
A semiconductor is a material that can absorb sunlight and convert it to electricity. Silicon is the most common one used in solar cells.[1]
Why do panels need an inverter?
A solar panel makes direct current, while homes and the grid use alternating current. The inverter converts one to the other.[6]
How efficient are solar panels?
The best panels for commercial use have efficiencies around 18% to 22%. The maximum theoretical efficiency for a silicon cell is about 32%.[5]
How many small-scale solar PV systems are there in Australia?
The Clean Energy Regulator’s postcode data, current as at 30 September 2026, lists 4,562,198 deemed solar PV systems for installation years 2001 to 2026.[7] The figure is a count of systems, not a measure of how much power they make.
The big idea
Light in, current out. Sunlight gives electrons energy inside a silicon cell. The junction pushes electrons and holes apart, the cell carries the current to an inverter, and the inverter turns direct current into the alternating current used by homes and the grid.
Related reading
Coming soon on William Wonderlab:
Explore more from scientists:
- Solar Photovoltaic Cell Basics (US Department of Energy)
- Light-generated current (PVEducation)
- Solar Integration: Inverters and Grid Services Basics (US Department of Energy)
References
[1] US Department of Energy, “Solar Photovoltaic Cell Basics” (accessed 25 October 2026)
[2] PVEducation, “Light Generated Current” (accessed 25 October 2026)
[3] PVEducation, “Doping” (accessed 25 October 2026)
[4] PVEducation, “Formation of a PN-Junction” (accessed 25 October 2026)
[5] US Department of Energy, “PV Cells 101: A Primer on the Solar Photovoltaic Cell” (accessed 25 October 2026)
[6] US Department of Energy, “Solar Integration: Inverters and Grid Services Basics” (accessed 25 October 2026)
[7] Clean Energy Regulator (Australia), “Small-scale installation postcode data” (accessed 25 October 2026)
Keep exploring
Now try the science yourself
Reading is a great start. Experimenting is even better: these interactive models use the same science as this article.



