Let's Imagine: USA 100% solar: USA area in km^2 usaSm = 9.147593e+6 km ^ 2 to km ^ 2 in miles^2
# USA area in km^2
usaSm = 9.147593e+6 km ^ 2 to km ^ 2
# in miles^2
usaSm = usaSm to miles ^ 2
# solar panel efficiency
# (eg.: 1000W solar energy in => 210 W electricity out)
panelEfficiency = 21 / 100
# average solar energy hitting 1m^2 per day in the USA
averageSunEnergyPerDayPerSqureMeter = 5 kWh / m ^ 2
# average electryicity production of 1m^2 solar panel (apllying the efficiency)
averageElectricityProductionPerSquateMeter = averageSunEnergyPerDayPerSqureMeter * panelEfficiency
# average electricity production per day if 100% of USA would be solar panels
maxElectricityProduction = usaSm * averageElectricityProductionPerSquateMeter to TWh
# total electricity consumption usa per year
totalElectricityConsumptionUSAPerYear = 4.07e+12 kWh to TWh
# average electricity consumption usa per day
totalElectricityConsumptionUSAPerDay = totalElectricityConsumptionUSAPerYear / 365
# electricity consumption per day devided by max production
solarPanelPercentageNeeded = totalElectricityConsumptionUSAPerDay / maxElectricityProduction
# how many km^2 needed in solar to cover 100% of average daily electricity consumption
res = usaSm * solarPanelPercentageNeeded to km ^ 2
# as miles^2
res to miles ^ 2
# get side length of the a quad needed
sideLength = sqrt(res) to km
# as miles
sideLength to miles
# this is what 103 km^2 look like on the map:
# https://jsfiddle.net/25uapryn/27/
# This is just an example and ofc the panels should be installed in different
# locations.
# This is not optimized. Putting the panels in sunnier areas will reduce
# the area needed etc.
# photovoltaik cost per W
costPerWatt = 0.26 $ / W
k = averageElectricityProductionPerSquateMeter * res / h
cost = k * costPerWatt
# Federal outlays in 2024 total $6.5 trillion,
# which amounts to 23.1 percent of GDP.
fo = 6.5e+12 $ / year
# if taking 5% of the Federal outlays
fo = fo * 5 / 100
# it will take these years to pay for the solar panels
# added 50% cost
(cost * 150 / 100) / fo