// Function to update fuel unit label based on selected fuel type
function updateFuelUnitLabel() {
var fuelType = document.getElementById('fuelType').value;
var fuelUnitLabelInput = document.getElementById('fuelUnitLabelInput');
var fuelUnitLabelOutput = document.getElementById('fuelUnitLabelOutput');
if (fuelType === 'naturalGas') {
fuelUnitLabelInput.textContent = '$/therm';
fuelUnitLabelOutput.textContent = 'therms';
} else { // propane
fuelUnitLabelInput.textContent = '$/gallon';
fuelUnitLabelOutput.textContent = 'gallons';
}
}
// Initial call to set the correct label on page load
document.addEventListener('DOMContentLoaded', updateFuelUnitLabel);
// Add event listener for when the fuel type changes
document.getElementById('fuelType').addEventListener('change', updateFuelUnitLabel);
function calculateGenerator() {
// Get input values
var homeSqFt = parseFloat(document.getElementById('homeSqFt').value);
var numAcUnits = parseFloat(document.getElementById('numAcUnits').value);
var hasElectricWaterHeater = document.getElementById('hasElectricWaterHeater').checked;
var hasElectricStove = document.getElementById('hasElectricStove').checked;
var hasWellPump = document.getElementById('hasWellPump').checked;
var fuelType = document.getElementById('fuelType').value;
var avgDailyOutageHours = parseFloat(document.getElementById('avgDailyOutageHours').value);
var generatorCost = parseFloat(document.getElementById('generatorCost').value);
var installationCost = parseFloat(document.getElementById('installationCost').value);
var fuelCostPerUnit = parseFloat(document.getElementById('fuelCostPerUnit').value);
// Validate inputs
if (isNaN(homeSqFt) || homeSqFt <= 0 ||
isNaN(numAcUnits) || numAcUnits < 0 ||
isNaN(avgDailyOutageHours) || avgDailyOutageHours < 0 ||
isNaN(generatorCost) || generatorCost < 0 ||
isNaN(installationCost) || installationCost < 0 ||
isNaN(fuelCostPerUnit) || fuelCostPerUnit < 0) {
alert("Please enter valid positive numbers for all fields.");
return;
}
// — Generator Sizing Logic (kW) —
var totalWattage = 0;
// Base load: General lighting, small appliances (e.g., 3 watts per sq ft)
totalWattage += homeSqFt * 3; // Watts
// Major Appliances (approximate running wattages)
var acWattage = 5000; // 5 kW per AC unit
var electricWaterHeaterWattage = 4500; // 4.5 kW
var electricStoveWattage = 8000; // 8 kW
var wellPumpWattage = 1500; // 1.5 kW
totalWattage += numAcUnits * acWattage;
if (hasElectricWaterHeater) {
totalWattage += electricWaterHeaterWattage;
}
if (hasElectricStove) {
totalWattage += electricStoveWattage;
}
if (hasWellPump) {
totalWattage += wellPumpWattage;
}
// Add a buffer for starting surges and future needs (e.g., 25% overhead)
totalWattage *= 1.25;
var recommendedKw = Math.ceil(totalWattage / 1000); // Convert to kW and round up
// Round up to common generator sizes for practicality
// Common residential sizes: 10, 12, 14, 16, 18, 20, 22, 24, 26, 30, 35, 40, 45, 50 kW
if (recommendedKw <= 10) recommendedKw = 10;
else if (recommendedKw <= 12) recommendedKw = 12;
else if (recommendedKw <= 14) recommendedKw = 14;
else if (recommendedKw <= 16) recommendedKw = 16;
else if (recommendedKw <= 18) recommendedKw = 18;
else if (recommendedKw <= 20) recommendedKw = 20;
else if (recommendedKw <= 22) recommendedKw = 22;
else if (recommendedKw <= 24) recommendedKw = 24;
else if (recommendedKw <= 26) recommendedKw = 26;
else if (recommendedKw <= 30) recommendedKw = 30;
else if (recommendedKw <= 35) recommendedKw = 35;
else if (recommendedKw <= 40) recommendedKw = 40;
else if (recommendedKw 0 && avgDailyOutageHours > 0) {
if (fuelType === 'naturalGas') {
// Scale consumption based on recommended kW relative to the base (20kW)
var ngThermsPerHour = (recommendedKw / 20) * baseNgThermsPerHour;
dailyFuelConsumption = ngThermsPerHour * avgDailyOutageHours;
dailyFuelCost = dailyFuelConsumption * fuelCostPerUnit;
} else { // propane
var propaneGallonsPerHour = (recommendedKw / 20) * basePropaneGallonsPerHour;
dailyFuelConsumption = propaneGallonsPerHour * avgDailyOutageHours;
dailyFuelCost = dailyFuelConsumption * fuelCostPerUnit;
}
}
// Display results
document.getElementById('recommendedKw').textContent = recommendedKw.toFixed(0);
document.getElementById('totalSystemCost').textContent = totalSystemCost.toFixed(2);
document.getElementById('dailyFuelConsumption').textContent = dailyFuelConsumption.toFixed(2);
document.getElementById('dailyFuelCost').textContent = dailyFuelCost.toFixed(2);
}
.calculator-container {
background-color: #f9f9f9;
border: 1px solid #ddd;
padding: 20px;
border-radius: 8px;
max-width: 600px;
margin: 20px auto;
font-family: Arial, sans-serif;
}
.calculator-container h2 {
text-align: center;
color: #333;
margin-bottom: 20px;
}
.calc-input-group {
margin-bottom: 15px;
display: flex;
flex-direction: column;
}
.calc-input-group label {
margin-bottom: 5px;
font-weight: bold;
color: #555;
}
.calc-input-group input[type="number"],
.calc-input-group select {
padding: 10px;
border: 1px solid #ccc;
border-radius: 4px;
font-size: 16px;
width: 100%;
box-sizing: border-box; /* Include padding and border in the element's total width and height */
}
.calc-input-group.checkbox-group {
flex-direction: row;
align-items: center;
}
.calc-input-group.checkbox-group input[type="checkbox"] {
width: auto;
margin-right: 10px;
}
.calc-input-group.checkbox-group label {
margin-bottom: 0;
}
button {
background-color: #007bff;
color: white;
padding: 12px 20px;
border: none;
border-radius: 4px;
font-size: 18px;
cursor: pointer;
width: 100%;
box-sizing: border-box;
transition: background-color 0.3s ease;
}
button:hover {
background-color: #0056b3;
}
.calc-results {
background-color: #e9ecef;
border: 1px solid #dee2e6;
padding: 15px;
border-radius: 8px;
margin-top: 20px;
}
.calc-results h3 {
color: #333;
margin-top: 0;
border-bottom: 1px solid #ccc;
padding-bottom: 10px;
margin-bottom: 15px;
}
.calc-results p {
margin-bottom: 10px;
font-size: 16px;
color: #333;
}
.calc-results p span {
font-weight: bold;
color: #007bff;
}
Understanding Whole Home Generators: Sizing, Fuel, and Costs
A whole home generator provides peace of mind, ensuring your household remains powered during outages. But choosing the right generator involves more than just picking a brand. You need to consider its size (kW), the type of fuel it uses, and the overall costs involved.
Why a Whole Home Generator?
Unlike portable generators that power a few essential appliances, a whole home (or standby) generator automatically kicks in when the power goes out, supplying electricity to your entire house or a pre-selected set of critical circuits. This means your HVAC, refrigerator, lights, and even electric water heater can continue to operate seamlessly.
Generator Sizing: How Many Kilowatts Do You Need?
The most crucial step is determining the correct generator size, measured in kilowatts (kW). An undersized generator won't power all your desired appliances, while an oversized one will cost more upfront and consume more fuel than necessary. Our calculator estimates your needs based on:
Home Square Footage: This provides a baseline for general lighting, small electronics, and miscellaneous loads.
Major Appliances: High-demand appliances like central air conditioning units, electric water heaters, electric stoves, and well pumps significantly impact the required generator size. These appliances have high "starting" (surge) and "running" wattages. Our calculator focuses on the running wattage and includes a buffer for surge demands.
Coverage Level: While our calculator aims for whole-home coverage, some homeowners opt for essential circuits only. A whole-home approach typically requires a larger unit.
General Rule of Thumb: A typical 2,000-3,000 sq ft home with central AC often requires a 20-22 kW generator. Larger homes or those with multiple high-demand electric appliances may need 25-45 kW or more.
Fuel Types: Natural Gas vs. Propane
Whole home generators primarily run on either natural gas or liquid propane (LP). Each has its advantages:
Natural Gas:
Pros: Unlimited supply (as long as the utility grid is up), no need for on-site storage tanks, generally lower fuel cost per unit.
Cons: Dependent on the natural gas utility, which can be disrupted in major disasters (though less common than electricity), requires a gas line connection.
Propane:
Pros: Can be stored on-site in tanks, making it independent of utility lines during widespread outages.
Cons: Requires a large, unsightly storage tank, fuel supply is finite (needs refilling), generally higher fuel cost per unit than natural gas.
Our calculator helps you estimate daily fuel consumption and cost based on your chosen fuel type and average outage duration.
Understanding the Costs: Generator Unit & Installation
The total cost of a whole home generator system involves two main components:
Generator Unit Cost: This is the price of the generator itself. Smaller units (10-14 kW) might range from $3,000-$6,000, while larger units (20-26 kW) typically fall between $6,000-$10,000. Very large residential units (30-50 kW+) can exceed $10,000-$15,000.
Installation Cost: This can often be as much as or more than the generator unit itself. Installation involves:
Electrical work (transfer switch, wiring)
Gas line connection (natural gas) or propane tank installation and line connection
Concrete pad for the generator
Permits and inspections
Labor
Installation costs typically range from $3,000 to $8,000, depending on the complexity of your home's electrical system and gas line requirements.
Our calculator provides an estimated total system cost by combining these two factors.
Using the Calculator
Input your home's square footage, the number of central AC units, and whether you have other major electric appliances. Select your preferred fuel type and provide estimates for daily outage duration, generator unit cost, installation cost, and your local fuel cost per unit. The calculator will then provide you with a recommended generator size, total system cost, and estimated daily fuel consumption and cost.
Remember, this calculator provides estimates. For precise sizing and quotes, always consult with a qualified electrician and generator installer in your area.