Solar Panel Calculator (How Many Panels and How Much Roof Space from System Size, Yearly kWh or Roof Area)
Choose what to start from, then enter the target size (or yearly kWh or roof area) and the rated power and size of one panel. The panel power and size are on the spec sheet or the quote.
Table of Contents
-
What you can do on this page
-
What is this calculation used for?
-
How to Use
-
Formula
-
Symbols and terms
-
Good to know before you start
-
How to calculate it in Excel
-
How to calculate it in Google Sheets
-
How to calculate it in Python
-
How to write it in LaTeX and other math languages (copy and paste)
-
How to have ChatGPT do the calculation
-
DataChef Features
-
Related Features
-
NumberChef Calculators List
What you can do on this page
- Enter a target system size (kW) and the rated power of one panel (W), and you get the number of panels needed (rounded up), the total system size (kW) and the total panel area (ft²) on the spot
- The "from a yearly kWh goal" mode works backward from the yearly output per kW (kWh/kW/yr) to the system size and the number of panels
- The "from roof area" mode allows for the usable share of the roof (80% by default) and finds how many panels fit (rounded down), the system size and an estimate of the yearly output
- A sketch of the panels laid out in a grid shows the number of panels and the overall size (width × height)
- A plain-language explanation of the formulas and copy-and-paste formulas for Excel, Google Sheets and Python are all on this page
What is this calculation used for?
A quote lists something like "400 W modules × 18, system size 7.2 kW". Enter the 7 kW target and the 400 W panel here, and you get the same 18 panels and 7.2 kW, so you can check the numbers behind the quote yourself.
You also see that 18 panels × 21.0 ft² = 378 ft² of panels have to go somewhere on the roof, and that at an 80% usage share you need about 472.5 ft² of roof. Walking into the meeting ready to ask "Does my south-facing roof have that much space?" is the best use of this calculation.
Say a south-facing roof plane is 400 ft². At an 80% usage share you can use 320 ft², so 21.0 ft² panels give about 15 panels (rounded down). With 400 W panels that is 6.0 kW, and in an area with 1,300 kWh/kW/yr about 7,800 kWh a year.
Use the real roof surface area: take the footprint area seen from above and scale it up for the slope (about 1.12 times for a 6/12 pitch). The real number depends on the roof shape (a rectangle-shaped gable plane or a triangle-shaped hip plane), obstacles such as skylights and vents, fire code setbacks and roof strength, so this is a first estimate before the installer's layout drawing.
Add up 12 months of electric bills. If your home uses 10,800 kWh a year, divide by the yearly output per kW to get the size that makes that much. With 1,300 kWh/kW/yr the target size is about 8.31 kW; with 430 W panels that is 20 panels and 8.6 kW, for an estimated 11,180 kWh a year.
But solar only makes power in the daytime, so you still draw from the grid at night. Whether equal production and use means a near-zero bill depends on your utility's net metering or net billing rules. "Make as much as you use" is a starting point for deciding whether to go a few panels smaller or larger.
For the same 7 kW target, 250 W panels take 28 panels (about 492.9 ft² in total for 65 in × 39 in panels), 400 W panels take 18 (378 ft²), and 450 W panels take 16. Higher-power panels need fewer panels and less area, so they matter most on small roofs.
On the other hand, reusing older or smaller panels means more panels, more roof area, more racking and more labor. Swapping in the power and size from each spec sheet puts the choices side by side in numbers.
On a 10 ft × 12 ft shed or small carport roof (120 ft²) at a 90% usage share, you can use 108 ft²; 108 ÷ 21.0 ≈ 5.14, so 5 panels, or 2.0 kW with 400 W panels. You can quickly see how many panels and kW a small roof can hold, which helps when the house roof is full, or for small off-grid projects such as an RV, a cabin or a farm pump.
This is a rough count based on area only. Sheds, carports and pergolas differ from a house roof in strength, mounting, snow and shade, so ask a qualified installer whether panels can really go there.
Formula
Symbols and terms
Symbols
| \(L\) | L | The length of one panel (in), the longer side of the outer size on the spec sheet. From the first letter of "length". |
| \(W\) | W | The width of one panel (in), the shorter side of the outer size on the spec sheet. From the first letter of "width". |
| \(a\) | a | The area of one panel (ft²). From the first letter of "area"; it is lowercase to tell it apart from the total area \(S\) and the roof area \(A\). |
| \(p\) | lowercase p | The rated power of one panel (W). From the first letter of "power"; it is lowercase to tell it apart from the total system size \(P\). |
| \(P_t\) | P sub t | The target system size (kW). The small \(t\) stands for target. |
| \(N\) | N | The number of panels - "panels needed" (rounded up) when starting from a target, "panels that fit" (rounded down) when starting from roof area. From the first letter of "number". |
| \(P\) | P | The total system size (kW), recalculated with the rounded number of panels. It is the system size on a quote. |
| \(S\) | S | The total panel area (ft²), the number of panels \(N\) times the area of one panel \(a\). The roof needs more space than this. \(S\) is a common symbol for area (said to come from the Latin superficies, "surface"). |
| \(A\) | A | The usable roof area (ft²) - the roof surface where panels can go. From the first letter of "area"; it is uppercase to tell it apart from the area of one panel \(a\). |
| \(u\) | u | The roof usage share (%), the share of the usable roof area that panels can actually cover. The default in this calculator is 80%. From the first letter of "utilization". |
| \(E_t\) | E sub t | The yearly kWh goal (kWh/yr). \(E\) is for energy, with a small \(t\) for target. |
| \(Y\) | Y | The yearly output per kW (kWh/kW/yr), a guide to how much a system makes in a given location and setup. From the first letter of "yield". |
| \(E\) | E | The estimated yearly output (kWh/yr) with the final number of panels. From the first letter of "energy". |
| \(\lceil\ \rceil\) | ceiling | The symbol for rounding the number inside up to a whole number (the ceiling function). \(\lceil 17.5 \rceil = 18\), \(\lceil 15 \rceil = 15\) (a whole number stays as it is). It is used to find the number of panels needed. |
| \(\lfloor\ \rfloor\) | floor | The symbol for rounding the number inside down to a whole number (the floor function), as in \(\lfloor 15.24 \rfloor = 15\). It is used to find how many panels fit on a roof. |
Terms
| solar panel (module) | A product made by joining dozens of small solar cells into one panel. Spec sheets often call it a "module". Each panel on a home roof is one module, and "one panel" in this calculator means one module. |
| rated power | The power (W) one panel makes under Standard Test Conditions (irradiance of 1 kW/m², panel temperature of 25°C (77°F) and so on). The "400 W" on a spec sheet is this value. On a real roof the conditions are different, so the panel runs below it most of the time. The panel count uses this value. |
| system size | The basic number for the size of a solar system, the rated power of all panels added up (kW), as in "a 7 kW system". With 400 W panels, 18 panels make 7.2 kW. |
| round up | To drop the decimal part and go to the next whole number (17.5 → 18). Panels come in whole numbers, so the number needed to reach a target is rounded up. In math this is written with the ceiling function \(\lceil\ \rceil\). |
| round down | To drop the decimal part and keep the whole number (15.24 → 15). The number of panels on a roof must not overflow it, so it is rounded down. In math this is written with the floor function \(\lfloor\ \rfloor\). |
| yearly output per kW | How much 1 kW of panels makes in a year (kWh/kW/yr). It packs the local solar radiation, direction, tilt and losses into one number. In much of the US, facing south, it is about 1,200 to 1,600. You can find the value for your own setup on the "Solar Panel Output Calculator" page. It is also called specific yield. |
| roof usage share | The share (%) of the usable roof area that panels can actually cover. Gaps between panels, setbacks from the roof edges and orientation limits keep it below 100%; the default in this calculator is 80%. It is higher for rectangle-shaped roof planes and lower for triangle-shaped ones. |
| setback | The space left between the panels and the roof edges (eaves, ridge and rakes) or gutters. It keeps wind from lifting the panels, lets rain drain and leaves room for maintenance. In many areas, fire codes also require clear paths, often about 18 to 36 inches wide, so firefighters can work on the roof (check your local rules). Setbacks are one of the main reasons the usage share is below 100%. |
| footprint area | The area of a roof seen from directly above (for example, on a satellite image or a floor plan). A roof is sloped, so this is smaller than the real surface area of the roof. |
| roof surface area | The area of the sloped roof surface itself. It is larger than the footprint area; for a 6/12 roof pitch (about 27°), it is about 1.12 times the footprint. Enter the roof surface area in "Usable roof area" on this page. |
| racking | The metal rails and mounts that hold the panels to the roof. They attach to the roof with brackets that suit the roofing material, and the panels sit on top. More panels mean longer racking, more weight and more work. |
| roof load | How much weight a roof can carry. A home solar panel weighs about 40 to 50 lb, and with racking the array adds roughly 3 lb per square foot to the roof. Older homes or some roof structures may need fewer panels, so ask the installer whether the roof can carry the number you calculated. |
Good to know before you start
Here is what helps you use the calculation on this page with real understanding, not just by pressing the button.
If you get stuck, going back over these topics is the quickest way forward.
| Area and units of area (Grades 3–6) |
|
| Rounding up and rounding down (Grade 4) |
|
| Multiplying and dividing decimals (Grades 5–6) |
|
| Percents (Grades 6–7) |
|
| Power and energy (middle school physical science) |
|
How to calculate it in Excel
| Length (in) | 67.8 |
| Width (in) | 44.6 |
| Area of one panel (ft²) | =B1*B2/144 |
| Target system size (kW) | 7 |
| Panel rated power (W) | 400 |
| Panels before rounding up | =B1*1000/B2 |
| Panels needed | =ROUNDUP(ROUND(B1*1000/B2,10),0) |
| Yearly kWh goal (kWh/yr) | 10800 |
| Yearly output per kW (kWh/kW/yr) | 1300 |
| Panel rated power (W) | 430 |
| Target system size (kW) | =B1/B2 |
| Panels needed | =ROUNDUP(ROUND(B4*1000/B3,10),0) |
| Number of panels | 18 |
| Panel rated power (W) | 400 |
| Area of one panel (ft²) | 21.0 |
| Roof usage share (%) | 80 |
| Total system size (kW) | =B1*B2/1000 |
| Total panel area (ft²) | =B1*B3 |
| Roof area needed at the usage share (ft²) | =B6/(B4/100) |
| Usable roof area (ft²) | 400 |
| Roof usage share (%) | 80 |
| Area of one panel (ft²) | 21.0 |
| Area you can use (ft²) | =B1*B2/100 |
| Panels before rounding down | =B4/B3 |
| Panels that fit | =ROUNDDOWN(ROUND(B4/B3,10),0) |
| Total system size (kW) | 7.2 |
| Yearly output per kW (kWh/kW/yr) | 1300 |
| Estimated yearly output (kWh/yr) | =B1*B2 |
The first table is the area of a 67.8 in × 44.6 in panel, and B3 shows about 20.9992 (ft²). The second table is the 7 kW, 400 W example: B3 shows 17.5, and B4, which uses the ROUNDUP function, shows 18 (panels).
The third table is the 10,800 kWh, 1,300 kWh/kW/yr, 430 W example: B4 shows about 8.308 (kW) and B5 shows 20 (panels). The fourth table is the 18 panels × 400 W, 21.0 ft² example: B5 shows 7.2 (kW), B6 shows 378 (ft²) and B7 shows 472.5 (the roof area needed at an 80% usage share).
The fifth table is the 400 ft² roof at 80%: B4 shows 320 (ft²), B5 about 15.24, and B6, which uses the ROUNDDOWN function, shows 15 (panels). The sixth table is 7.2 kW × 1,300 kWh/kW/yr, and B3 shows 9360 (kWh/yr). Just replace the numbers in column B with your own panel and roof values.
The ROUND(…,10) (round to 10 decimal places) inside ROUNDUP and ROUNDDOWN is there because a division that should come out even (for example, 4.8 kW ÷ 400 W = exactly 12 panels) can become 12.000000000000002 from a tiny error inside the computer, which would give one panel too many (or too few).
How to calculate it in Google Sheets
| Length (in) | 67.8 |
| Width (in) | 44.6 |
| Area of one panel (ft²) | =B1*B2/144 |
| Target system size (kW) | 7 |
| Panel rated power (W) | 400 |
| Panels before rounding up | =B1*1000/B2 |
| Panels needed | =ROUNDUP(ROUND(B1*1000/B2,10),0) |
| Yearly kWh goal (kWh/yr) | 10800 |
| Yearly output per kW (kWh/kW/yr) | 1300 |
| Panel rated power (W) | 430 |
| Target system size (kW) | =B1/B2 |
| Panels needed | =ROUNDUP(ROUND(B4*1000/B3,10),0) |
| Number of panels | 18 |
| Panel rated power (W) | 400 |
| Area of one panel (ft²) | 21.0 |
| Roof usage share (%) | 80 |
| Total system size (kW) | =B1*B2/1000 |
| Total panel area (ft²) | =B1*B3 |
| Roof area needed at the usage share (ft²) | =B6/(B4/100) |
| Usable roof area (ft²) | 400 |
| Roof usage share (%) | 80 |
| Area of one panel (ft²) | 21.0 |
| Area you can use (ft²) | =B1*B2/100 |
| Panels before rounding down | =B4/B3 |
| Panels that fit | =ROUNDDOWN(ROUND(B4/B3,10),0) |
| Total system size (kW) | 7.2 |
| Yearly output per kW (kWh/kW/yr) | 1300 |
| Estimated yearly output (kWh/yr) | =B1*B2 |
How to calculate it in Python
import math
from decimal import Decimal
# Numbers are kept as Decimal (base-10 decimals). With float, a division that should come out even,
# such as 4.03*1000/130, can give 31.000000000000004, and rounding up would add one extra panel
mode = "capacity" # "capacity" = from target size / "energy" = from yearly kWh goal / "area" = from roof area
target_kw = Decimal("7") # target system size P_t (kW). Used when mode="capacity"
target_kwh = Decimal("10800") # yearly kWh goal E_t (kWh/yr). Used when mode="energy"
roof_area_ft2 = Decimal("400") # usable roof area A (ft2). Used when mode="area"
utilization_percent = Decimal("80") # roof usage share u (%)
yield_kwh_per_kw = Decimal("1300") # yearly output per kW Y (kWh/kW/yr). None if unknown
panel_watt = Decimal("400") # rated power of one panel p (W)
panel_length_in = Decimal("67.8") # panel length L (in)
panel_width_in = Decimal("44.6") # panel width W (in)
# Area of one panel a (ft2) = L x W / 144
panel_area_ft2 = panel_length_in * panel_width_in / Decimal("144")
if mode == "area":
# From roof area: panels that fit = floor(A x u/100 / a) (round down)
usable_area_ft2 = roof_area_ft2 * utilization_percent / Decimal("100")
panel_count = math.floor(usable_area_ft2 / panel_area_ft2)
else:
if mode == "energy":
# Turn the yearly kWh goal into a target size: P_t = E_t / Y
target_kw = target_kwh / yield_kwh_per_kw
# Panels needed = ceil(P_t x 1000 / p) (round up)
panel_count = math.ceil(target_kw * Decimal("1000") / panel_watt)
total_kw = panel_count * panel_watt / Decimal("1000") # total system size P (kW)
total_area_ft2 = panel_count * panel_area_ft2 # total panel area S (ft2)
print(f"Area of one panel: {panel_area_ft2:.4f} ft2")
print(f"Panels: {panel_count}, total size: {total_kw:.3f} kW, total area: {total_area_ft2:.2f} ft2")
if mode != "area":
# Roof area needed at the usage share (not shown for mode="area", where it is the area you entered)
roof_needed_ft2 = total_area_ft2 / (utilization_percent / Decimal("100"))
print(f"Roof area needed at {utilization_percent}% usage: {roof_needed_ft2:.1f} ft2")
if yield_kwh_per_kw is not None:
print(f"Estimated yearly output: {total_kw * yield_kwh_per_kw:.0f} kWh/yr")
How to write it in LaTeX and other math languages (copy and paste)
a = L × W ÷ 144
a = \frac{L \times W}{144}
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mrow>
<mi>a</mi>
<mo>=</mo>
<mfrac>
<mrow><mi>L</mi><mo>×</mo><mi>W</mi></mrow>
<mn>144</mn>
</mfrac>
</mrow>
</math>
a = (L * W) / 144
panelArea = length*width/144
a := L*W/144;
a = L*W/144;
a = (L×W)/144
N = ⌈Pₜ × 1000 ÷ p⌉
N = \left\lceil \frac{P_t \times 1000}{p} \right\rceil
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mrow>
<mi>N</mi>
<mo>=</mo>
<mo>⌈</mo>
<mfrac>
<mrow><msub><mi>P</mi><mi>t</mi></msub><mo>×</mo><mn>1000</mn></mrow>
<mi>p</mi>
</mfrac>
<mo>⌉</mo>
</mrow>
</math>
N = |~ (P_t * 1000) / p ~|
panelCount = Ceiling[targetKw*1000/panelW]
N := ceil(P_t*1000/p);
N = ceil(P_t*1000/p);
N = ⌈(P_t×1000)/p⌉
Pₜ = Eₜ ÷ Y
P_t = \frac{E_t}{Y}
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mrow>
<msub><mi>P</mi><mi>t</mi></msub>
<mo>=</mo>
<mfrac>
<msub><mi>E</mi><mi>t</mi></msub>
<mi>Y</mi>
</mfrac>
</mrow>
</math>
P_t = E_t / Y
targetKw = targetKwh/yieldPerKw
P_t := E_t/Y;
P_t = E_t/Y;
P_t = E_t/Y
P = N × p ÷ 1000, S = N × a
P = \frac{N \times p}{1000}, \quad S = N \times a
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mrow>
<mi>P</mi>
<mo>=</mo>
<mfrac>
<mrow><mi>N</mi><mo>×</mo><mi>p</mi></mrow>
<mn>1000</mn>
</mfrac>
<mo>,</mo>
<mspace width="1em"/>
<mi>S</mi>
<mo>=</mo>
<mi>N</mi>
<mo>×</mo>
<mi>a</mi>
</mrow>
</math>
P = (N * p) / 1000, S = N * a
totalKw = panelCount*panelW/1000; totalArea = panelCount*panelArea
P := N*p/1000; S := N*a;
P = N*p/1000; S = N*a;
P = (N×p)/1000, S = N×a
N = ⌊A × u ÷ 100 ÷ a⌋
N = \left\lfloor \frac{A \times \frac{u}{100}}{a} \right\rfloor
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mrow>
<mi>N</mi>
<mo>=</mo>
<mo>⌊</mo>
<mfrac>
<mrow><mi>A</mi><mo>×</mo><mfrac><mi>u</mi><mn>100</mn></mfrac></mrow>
<mi>a</mi>
</mfrac>
<mo>⌋</mo>
</mrow>
</math>
N = |__ (A * u / 100) / a __|
panelCount = Floor[roofArea*util/100/panelArea]
N := floor(A*u/100/a);
N = floor(A*u/100/a);
N = ⌊(A×u/100)/a⌋
E = P × Y
E = P \times Y
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mrow>
<mi>E</mi>
<mo>=</mo>
<mi>P</mi>
<mo>×</mo>
<mi>Y</mi>
</mrow>
</math>
E = P * Y
yearlyKwh = totalKw*yieldPerKw
E := P*Y;
E = P*Y;
E = P×Y
How to have ChatGPT do the calculation
You are a solar design assistant. Do the following calculation by actually running Python code, and base your answer only on the numbers from the execution result (do not answer by mental math or guessing). The target system size is 7 kW, the rated power of one panel is 400 W, and one panel is 67.8 in long and 44.6 in wide. The roof usage share is 80% and the yearly output per kW is 1,300 kWh/kW/yr. Find the number of panels needed by rounding up "target size (kW) × 1000 ÷ power of one panel (W)" to a whole number (math.ceil). Find each of the following: 1. The area of one panel (ft²) = length (in) × width (in) ÷ 144 2. The number of panels needed and the total system size (kW) with that number 3. The total panel area (ft²) and the roof area needed at an 80% usage share (ft²) 4. The estimated yearly output (kWh/yr) = total size × yearly output per kW Show the formulas you used and the numbers from the execution result.
How to Use
-
1Enter your numbersType the numbers you want to calculate with into the input fields
-
2CalculatePress the "Calculate" button
-
3Check the resultThe result appears on the spot. The same page also explains the idea behind the calculation and the formula
DataChef Features
No technical knowledge required.
Intuitive and user-friendly operation.
Can be used without registering personal information.
Automatic file deletion by clicking "download".
and rapid file conversion.
No attribution required.
No need to contact us for commercial use permission.
