Roof Dimension Calculator

Roof Dimension Calculator: Precise Measurements Made Easy :root { –primary-color: #004a99; –success-color: #28a745; –background-color: #f8f9fa; –text-color: #333; –border-color: #ccc; –shadow-color: rgba(0, 0, 0, 0.1); } body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background-color: var(–background-color); color: var(–text-color); line-height: 1.6; margin: 0; padding: 0; display: flex; flex-direction: column; align-items: center; padding-top: 20px; padding-bottom: 40px; } .container { width: 95%; max-width: 1000px; background-color: #fff; padding: 25px; border-radius: 8px; box-shadow: 0 4px 15px var(–shadow-color); margin-bottom: 30px; } h1, h2, h3 { color: var(–primary-color); text-align: center; } h1 { font-size: 2.2em; margin-bottom: 20px; } h2 { font-size: 1.8em; margin-top: 30px; margin-bottom: 15px; border-bottom: 2px solid var(–primary-color); padding-bottom: 5px; } h3 { font-size: 1.4em; margin-top: 25px; margin-bottom: 10px; } .calculator-section { margin-bottom: 30px; padding: 20px; border: 1px solid var(–border-color); border-radius: 6px; background-color: #fdfdfd; } .loan-calc-container { display: flex; flex-direction: column; gap: 15px; } .input-group { display: flex; flex-direction: column; margin-bottom: 10px; } .input-group label { display: block; margin-bottom: 5px; font-weight: bold; color: var(–primary-color); } .input-group input, .input-group select { padding: 10px; border: 1px solid var(–border-color); border-radius: 4px; font-size: 1em; width: 100%; box-sizing: border-box; } .input-group .helper-text { font-size: 0.85em; color: #666; margin-top: 5px; } .error-message { color: #dc3545; font-size: 0.85em; margin-top: 5px; min-height: 1.1em; /* Prevent layout shift */ } button { background-color: var(–primary-color); color: white; padding: 12px 20px; border: none; border-radius: 5px; font-size: 1.1em; cursor: pointer; transition: background-color 0.3s ease; margin-top: 10px; } button:hover { background-color: #003366; } #result-section { margin-top: 25px; padding: 20px; background-color: #e7f3ff; border-left: 5px solid var(–primary-color); border-radius: 4px; } #result-section h3 { margin-top: 0; color: var(–primary-color); } #primary-result { font-size: 2.5em; font-weight: bold; color: var(–primary-color); margin-bottom: 10px; display: block; text-align: center; } #intermediate-results div, #assumptions div { margin-bottom: 8px; font-size: 1.1em; } #assumptions { margin-top: 15px; font-size: 0.95em; color: #555; } #copy-button, #reset-button { background-color: var(–success-color); margin-left: 10px; } #copy-button:hover, #reset-button:hover { background-color: #218838; } table { width: 100%; border-collapse: collapse; margin-top: 20px; box-shadow: 0 2px 5px var(–shadow-color); } th, td { padding: 10px 12px; text-align: left; border: 1px solid var(–border-color); } th { background-color: var(–primary-color); color: white; font-weight: bold; } tbody tr:nth-child(even) { background-color: #f2f2f2; } .chart-container { margin-top: 30px; text-align: center; background-color: #fff; padding: 20px; border-radius: 6px; box-shadow: 0 2px 5px var(–shadow-color); } .article-content { margin-top: 40px; width: 95%; max-width: 1000px; background-color: #fff; padding: 30px; border-radius: 8px; box-shadow: 0 4px 15px var(–shadow-color); } .article-content p, .article-content ul, .article-content ol { margin-bottom: 15px; font-size: 1.05em; } .article-content ul, .article-content ol { padding-left: 25px; } .article-content li { margin-bottom: 8px; } .article-content a { color: var(–primary-color); text-decoration: none; font-weight: bold; } .article-content a:hover { text-decoration: underline; } .copy-confirmation { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background-color: var(–success-color); color: white; padding: 10px 20px; border-radius: 5px; opacity: 0; transition: opacity 0.5s ease-in-out; z-index: 1000; } .copy-confirmation.show { opacity: 1; } #calculator-canvas { max-width: 100%; height: auto; } @media (min-width: 768px) { .container { padding: 30px; } .loan-calc-container { gap: 20px; } .input-group input, .input-group select { max-width: 400px; } .button-container { display: flex; justify-content: center; gap: 15px; margin-top: 20px; } .button-container button { margin-top: 0; } }

Roof Dimension Calculator

Accurate Roof Area, Pitch, and Material Estimation Tool

Roof Dimension Calculator

Measure the horizontal distance from eave to peak (or ridge to edge) for one side of the roof.
Measure the horizontal distance along the ridge or eave for one side of the roof section.
Enter the pitch as 'Rise/Run' (e.g., 4/12 means 4 feet rise for every 12 feet of run).

Calculation Results

Roof Slope Length: ft
Total Roof Area: sq ft
Roof Pitch (Degrees): °

Assumptions:

Calculations assume a simple rectangular roof section. Overhangs are not included.
Pitch ratio 'X/12' implies a run of 12 units for every X units of rise.

Formula Used:

Roof Slope Length = √( (Roof Width/2)² + Roof Length² )
Total Roof Area = Roof Slope Length * Roof Width
Roof Pitch (Degrees) = atan(Rise/Run) * (180/π)

Roof Area vs. Pitch Comparison

This chart visualizes how roof pitch affects the total roof area for a fixed roof length (40ft) and width (20ft).
Roof Dimension Calculator Variables
Variable Meaning Unit Typical Range
Roof Section Length Horizontal distance from eave to peak (or ridge to edge) Feet (ft) 10 – 100+
Roof Section Width Horizontal distance along the ridge or eave Feet (ft) 10 – 100+
Roof Pitch Ratio Ratio of vertical rise to horizontal run (e.g., 4/12) Ratio 1/12 to 12/12+
Roof Slope Length The actual angled length of the roof surface Feet (ft) Calculated
Total Roof Area The total surface area of the roof section Square Feet (sq ft) Calculated
Roof Pitch (Degrees) The angle of the roof slope in degrees Degrees (°) Calculated
Results copied to clipboard!

Roof Dimension Calculator: Precise Measurements Made Easy

Understanding your roof's dimensions is a critical first step for any roofing project, whether you're planning a replacement, installing solar panels, or simply assessing potential issues. Our Roof Dimension Calculator is designed to provide accurate calculations for roof area, slope length, and pitch, simplifying complex geometry into easy-to-understand figures. This tool is invaluable for homeowners, contractors, and DIY enthusiasts alike, ensuring you have the precise measurements needed for material purchasing, cost estimation, and project planning.

What is a Roof Dimension Calculator?

A Roof Dimension Calculator is a specialized tool that helps determine the size, shape, and angles of a roof. It typically takes basic measurements of the roof's footprint and its pitch (steepness) as input and outputs key figures such as the total roof surface area, the length of the sloped sections (slope length), and the roof's angle in degrees. This is fundamentally different from a loan calculator, which deals with financial metrics like principal, interest, and repayment terms. Instead, a roof dimension calculator focuses on geometric and trigonometric principles applied to roof structures.

Who should use it:

  • Homeowners: Planning a re-roofing project, getting quotes from contractors, or estimating material needs for DIY repairs.
  • Roofing Contractors: Quickly calculating material requirements (shingles, underlayment, etc.) for bids and job planning.
  • Solar Panel Installers: Determining the available surface area and optimal angles for panel placement.
  • Architects and Builders: For preliminary design and feasibility studies.
  • Insurance Adjusters: Assessing roof damage and required repair scope.

Common misconceptions:

  • Roof Area = Footprint Area: Many people mistakenly assume the roof's surface area is the same as the building's footprint. In reality, due to the pitch, the actual roof surface area is always larger.
  • Pitch is just a number: Roof pitch significantly impacts material usage, installation difficulty, wind resistance, and drainage efficiency.
  • Simple geometry applies everywhere: Complex roof shapes (hips, valleys, dormers) require more advanced calculations or specialized software, but this calculator provides accurate results for basic rectangular or gable sections.

Roof Dimension Calculator Formula and Mathematical Explanation

The calculations performed by this roof dimension calculator are based on fundamental geometry and trigonometry. We'll break down the formulas used for a standard rectangular roof section.

1. Roof Slope Length (Hypotenuse):

For a single slope (like a shed roof) or one side of a gable roof, we can visualize a right-angled triangle. The 'run' is half the width of the roof section (if calculating for a gable roof where width is the total distance from eave to eave and the peak is the center), and the 'rise' is determined by the pitch. However, a simpler approach for calculating the *slope length* uses the roof's horizontal length (along the slope's direction) and half of its width (if the length is measured from the peak down). More commonly, if length is the horizontal run along the slope's direction and width is the horizontal distance across the roof ridge, we use Pythagorean theorem:

Slope Length = √((Roof Width / 2)² + Roof Length²)

This formula applies the Pythagorean theorem (a² + b² = c²) where 'a' is half the roof width, 'b' is the roof length (horizontal distance from peak to edge or eave to peak), and 'c' is the slope length.

2. Total Roof Area:

The total surface area of the roof section is the calculated slope length multiplied by the horizontal width of the roof section along the ridge.

Total Roof Area = Roof Slope Length * Roof Width

This gives you the actual square footage of roofing material needed for that section.

3. Roof Pitch in Degrees:

Roof pitch is often expressed as a ratio (e.g., 4/12), meaning for every 12 units of horizontal run, the roof rises 4 units. To convert this to degrees, we use the arctangent function (atan), which finds the angle whose tangent is a given number. The tangent of the angle is the ratio of the opposite side (rise) to the adjacent side (run).

First, extract the Rise and Run from the ratio (e.g., from "4/12", Rise = 4, Run = 12).

Angle in Radians = atan(Rise / Run)

Then, convert radians to degrees:

Roof Pitch (Degrees) = Angle in Radians * (180 / π)

Where π (pi) is approximately 3.14159.

Variables Table:

Variable Meaning Unit Typical Range
Roof Section Length (L) Horizontal distance from eave to peak, or along the slope's direction. Feet (ft) 10 – 100+
Roof Section Width (W) Horizontal distance across the roof (ridge to edge for gable, or overall width for shed). Feet (ft) 10 – 100+
Roof Pitch Ratio (Rise/Run) Ratio defining the steepness of the roof. Ratio 1/12 (very low slope) to 12/12 (45°) or higher.
Roof Slope Length (S) The actual measurement along the slanted surface of the roof. Feet (ft) Calculated value, generally > Roof Length.
Total Roof Area (A) The total surface area of the roof section to be covered. Square Feet (sq ft) Calculated value, generally > (Roof Length * Roof Width).
Roof Pitch (Degrees) The angle of the roof slope relative to horizontal. Degrees (°) Calculated value, typically 0° to 60°+.

Practical Examples (Real-World Use Cases)

Example 1: Standard Gable Roof Section

A homeowner is planning to replace the shingles on a gable roof. One side of the roof section measures 40 feet horizontally from the peak to the eave (Roof Section Length) and 20 feet horizontally along the ridge (Roof Section Width). The roof pitch is marked as 6/12.

  • Inputs:
  • Roof Section Length: 40 ft
  • Roof Section Width: 20 ft
  • Roof Pitch Ratio: 6/12

Using the calculator:

  • Outputs:
  • Roof Slope Length: 41.95 ft
  • Total Roof Area: 839.07 sq ft
  • Roof Pitch (Degrees): 26.57°

Interpretation: This means that for this side of the gable roof, the actual sloped surface is nearly 42 feet long. The total area to be covered with shingles is approximately 839 sq ft. This figure is crucial for ordering the correct number of shingle bundles, considering standard bundle coverage and potential waste factor.

Example 2: Shed Roof for an Addition

A homeowner is adding a small extension to their house with a simple shed roof. The horizontal distance from the high wall to the low wall is 30 feet (Roof Section Length), and the width of the extension along the building is 15 feet (Roof Section Width). The pitch is relatively steep at 9/12.

  • Inputs:
  • Roof Section Length: 30 ft
  • Roof Section Width: 15 ft
  • Roof Pitch Ratio: 9/12

Using the calculator:

  • Outputs:
  • Roof Slope Length: 32.47 ft
  • Total Roof Area: 487.06 sq ft
  • Roof Pitch (Degrees): 36.87°

Interpretation: The actual sloped surface is about 32.5 feet long. The total area needing covering is around 487 sq ft. The steep pitch (nearly 37 degrees) is good for shedding snow and rain but might influence the choice of roofing material and installation method.

How to Use This Roof Dimension Calculator

Using our Roof Dimension Calculator is straightforward. Follow these steps:

  1. Measure Your Roof: Accurately measure the horizontal dimensions of the roof section you are interested in.
    • Roof Section Length: Measure the horizontal distance from the peak (ridge) down to the eave, or from the eave to the peak. If it's a simple shed roof, measure the horizontal distance from the high wall to the low wall.
    • Roof Section Width: Measure the horizontal distance along the ridge line (for a gable roof) or along the building wall (for a shed roof).
  2. Determine Roof Pitch: Identify the roof pitch. This is often expressed as 'Rise over Run' (e.g., 4/12, 6/12). If you don't know it, you can measure the vertical rise for a 12-inch horizontal run. Enter this ratio (e.g., "4/12").
  3. Input Values: Enter the measurements into the corresponding fields in the calculator. Ensure you use consistent units (feet in this case).
  4. Calculate: Click the "Calculate Dimensions" button.
  5. Review Results: The calculator will display:
    • Primary Result (Total Roof Area): The total square footage of the roof surface.
    • Intermediate Values: Roof Slope Length and Roof Pitch in Degrees.
    • Assumptions: Notes about the calculation's scope (e.g., simple shapes, no overhangs).
  6. Interpret and Use: Use the Total Roof Area figure to order roofing materials. The slope length and pitch degrees provide additional insights for planning and material optimization. For example, knowing the slope length helps estimate the number of courses of shingles needed.
  7. Reset: Use the "Reset" button to clear the fields and start over with new measurements.
  8. Copy: Use the "Copy Results" button to easily transfer the calculated dimensions to your notes or project management tool.

Decision-Making Guidance: The calculated roof area is the most critical number for material purchasing. Always add a waste factor (typically 10-15%) to account for cuts, mistakes, and difficult areas. The pitch in degrees can help you understand installation complexity and potential water runoff issues. Steeper roofs might require different installation techniques or materials.

Key Factors That Affect Roof Dimension Results

While the calculator provides precise geometric outputs based on your inputs, several real-world factors influence how these dimensions translate into a project:

  1. Roof Complexity: This calculator is primarily for simple rectangular sections (shed or gable). Complex roofs with hips, valleys, dormers, or multiple intersecting planes require additional calculations for each section and will have a significantly larger total area than a simple footprint suggests.
  2. Overhangs (Eaves and Rakes): The calculated dimensions typically represent the roof surface area up to the edge. Actual roofing projects need to account for overhangs, which add to the material needed for soffits and fascia, and slightly increase the overall roof surface if measured from the wall outwards.
  3. Material Type and Waste Factor: Different roofing materials (shingles, metal panels, tiles) have different dimensions, installation methods, and waste percentages. Shingles usually require a 10-15% waste factor, while metal panels might need less (5-10%) depending on the profile and roof complexity. Always factor this in!
  4. Building Codes and Local Regulations: Building codes dictate minimum and maximum roof pitches, especially in areas prone to heavy snow or wind. Understanding these requirements is essential before finalizing material choices or installation plans.
  5. Ventilation Requirements: Proper attic ventilation is crucial for roof longevity and energy efficiency. This involves calculating soffit and ridge vent areas, which are related to the roof's perimeter and length, not just its area.
  6. Underlayment and Flashing: Beyond the primary roofing material, you need underlayment (like felt or synthetic membranes) and flashing for valleys, penetrations (vents, chimneys), and edges. The amount needed depends on the roof's features and dimensions.
  7. Accessibility and Safety: Working on steeper pitches (higher degrees) or larger roof areas increases installation complexity and safety risks, potentially impacting labor costs and the time required for the project.

Frequently Asked Questions (FAQ)

Q1: How accurate is this roof dimension calculator?
A1: The calculator provides mathematically accurate results based on the geometric formulas for simple roof sections. Accuracy depends entirely on the precision of your initial measurements (Length, Width, Pitch).
Q2: Does the calculator account for roof overhangs?
A2: No, this calculator calculates the roof surface area based on the provided dimensions and does not include typical roof overhangs. You will need to add material for overhangs separately.
Q3: What does a "4/12" pitch mean?
A3: A 4/12 pitch means that for every 12 feet of horizontal distance (run), the roof rises vertically by 4 feet. Our calculator converts this ratio into degrees (approximately 18.43° for 4/12).
Q4: Can I use this for complex roofs with hips and valleys?
A4: This calculator is best suited for simple rectangular roof sections (like shed or gable roofs). For complex roofs, you'll need to break them down into simpler sections and calculate each part individually, or use specialized architectural software.
Q5: How do I calculate the number of shingles I need?
A5: Once you have the Total Roof Area (in sq ft), consult the packaging of your chosen shingles. It will specify the coverage per bundle (usually in sq ft). Divide your total roof area by the coverage per bundle, and then add a 10-15% waste factor.
Q6: What if my roof pitch isn't a simple ratio like 4/12?
A5: If you can measure the actual vertical rise and horizontal run (even if not 12 units), you can calculate the ratio (Rise / Run) and enter it, or simply input the calculated degrees if your input method allows. Our tool specifically takes a ratio input.
Q7: Why is the Roof Slope Length greater than the Roof Length?
A7: The Roof Length is typically the horizontal distance, while the Roof Slope Length is the actual measurement along the angled surface. Due to the angle (pitch), the sloped path is always longer than the horizontal distance covered, similar to how the hypotenuse is longer than the legs of a right triangle.
Q8: Can this calculator help estimate costs?
A8: Indirectly, yes. By providing accurate material quantities (Total Roof Area), it forms the basis for material cost estimations. However, it does not calculate labor costs, potential repairs, or other project expenses.

Related Tools and Internal Resources

Understanding your roof's dimensions is fundamental to successful roofing projects. This calculator provides the core geometric data you need, empowering you to make informed decisions about materials, planning, and execution. For more complex scenarios or detailed project costings, explore our other resources.

var canvas = document.getElementById("roofChart"); var ctx = canvas.getContext("2d"); canvas.width = 600; // Set a reasonable default width canvas.height = 300; // Set a reasonable default height function drawChart(primaryResult, pitchDegrees) { ctx.clearRect(0, 0, canvas.width, canvas.height); var data = generateChartData(primaryResult, pitchDegrees); var chartHeight = canvas.height – 40; // Space for labels var chartWidth = canvas.width – 60; // Space for labels var barWidth = chartWidth / (data.labels.length * 2); var maxArea = Math.max(…data.series[0].values); var maxPitch = Math.max(…data.series[1].values); var scaleArea = chartHeight / maxArea; var scalePitch = chartHeight / maxPitch; // Draw X axis ctx.beginPath(); ctx.moveTo(30, canvas.height – 20); ctx.lineTo(canvas.width – 30, canvas.height – 20); ctx.strokeStyle = "#ccc"; ctx.stroke(); // Draw Y axis (for Area) ctx.beginPath(); ctx.moveTo(30, canvas.height – 20); ctx.lineTo(30, 20); ctx.strokeStyle = "#ccc"; ctx.stroke(); // Draw Y axis (for Pitch) – conceptually, can be complex on one axis // For simplicity, we'll label bars clearly instead of a second Y axis // Draw bars and labels var xOffset = 45; for (var i = 0; i < data.labels.length; i++) { var area = data.series[0].values[i]; var pitch = data.series[1].values[i]; // Area Bar var areaBarHeight = area * scaleArea; ctx.fillStyle = data.series[0].color; ctx.fillRect(xOffset, canvas.height – 20 – areaBarHeight, barWidth, areaBarHeight); ctx.fillStyle = "#000"; ctx.font = '10px Arial'; ctx.fillText(data.labels[i], xOffset + barWidth / 2, canvas.height – 5, barWidth); // Label x-axis category ctx.fillText(Math.round(area) + " sq ft", xOffset + barWidth / 2, canvas.height – 20 – areaBarHeight – 5, barWidth); // Label value // Pitch Bar (offset slightly) var pitchBarHeight = pitch * scalePitch; ctx.fillStyle = data.series[1].color; ctx.fillRect(xOffset + barWidth + 5, canvas.height – 20 – pitchBarHeight, barWidth, pitchBarHeight); ctx.fillStyle = "#000"; ctx.font = '10px Arial'; ctx.fillText(Math.round(pitch) + "°", xOffset + barWidth + 5 + barWidth / 2, canvas.height – 20 – pitchBarHeight – 5, barWidth); // Label value xOffset += barWidth * 2 + 10; } // Legend ctx.font = '12px Arial'; ctx.fillStyle = '#333'; var legendX = 30; var legendY = 15; ctx.fillStyle = data.series[0].color; ctx.fillRect(legendX, legendY, 15, 10); ctx.fillStyle = '#333'; ctx.fillText(data.series[0].label, legendX + 20, legendY + 10); legendX += ctx.measureText(data.series[0].label).width + 30; ctx.fillStyle = data.series[1].color; ctx.fillRect(legendX, legendY, 15, 10); ctx.fillStyle = '#333'; ctx.fillText(data.series[1].label, legendX + 20, legendY + 10); } function generateChartData(currentArea, currentPitch) { // Example: Show how area changes with pitch for a fixed length/width // Fixed values for demonstration: Length = 40ft, Width = 20ft var fixedLength = 40; var fixedWidth = 20; var pitches = [ { ratio: "1/12", degrees: 18.43, label: "3:12" }, { ratio: "4/12", degrees: 26.57, label: "4:12" }, { ratio: "6/12", degrees: 33.69, label: "6:12" }, { ratio: "8/12", degrees: 41.63, label: "8:12" }, { ratio: "10/12", degrees: 46.60, label: "10:12" }, { ratio: "12/12", degrees: 45.00, label: "12:12" } // Corrected 12/12 to 45 degrees ]; var data = { labels: [], series: [ { label: "Roof Area (sq ft)", color: "rgba(0, 74, 153, 0.7)", values: [] }, // Primary color { label: "Pitch (degrees)", color: "rgba(40, 167, 69, 0.7)", values: [] } // Success color ] }; pitches.forEach(function(pitchInfo) { var run = 12; var rise = parseFloat(pitchInfo.ratio.split('/')[0]); var currentPitchRatio = rise / run; // Recalculate slope length based on pitch and fixed length/width // If length is measured from peak to eave horizontally, and width is total horizontal width // We need to adjust logic slightly. Assuming 'length' is horizontal distance along slope direction, // and 'width' is the horizontal distance across ridge. // For simplicity in this chart, let's use Length as the run component related to pitch. // And Width as the perpendicular dimension. // Pythagorean theorem: SlopeLength = sqrt(Length^2 + (Width/2)^2) if Length is horizontal run from peak. // If Length is horizontal distance along slope direction, and Width is distance across ridge: // Slope Length = sqrt(Length^2 + (Rise_per_unit_run * Length)^2) – This is complex. // Let's use the formula that relates pitch to slope length: // Slope Length = Roof Length / cos(angle in radians) IF Roof Length is horizontal run. // If Roof Length is horizontal distance along slope direction (e.g. from peak down): // Slope Length = Roof Length. We need the width's contribution. // Revisit formula: S = sqrt( (W/2)^2 + L^2 ) // This implies L is perpendicular to W/2. Let's assume L is horizontal distance from peak to edge. // And W is horizontal distance across the ridge. var calculatedSlopeLength = Math.sqrt(Math.pow(fixedWidth / 2, 2) + Math.pow(fixedLength, 2)); var calculatedArea = calculatedSlopeLength * fixedWidth; var calculatedDegrees = Math.atan(currentPitchRatio) * (180 / Math.PI); data.labels.push(pitchInfo.label); data.series[0].values.push(calculatedArea); data.series[1].values.push(calculatedDegrees); }); return data; } function calculateRoofDimensions() { var roofLength = parseFloat(document.getElementById("roofLength").value); var roofWidth = parseFloat(document.getElementById("roofWidth").value); var roofPitchRatioStr = document.getElementById("roofPitchRatio").value; var lengthError = document.getElementById("roofLengthError"); var widthError = document.getElementById("roofWidthError"); var pitchError = document.getElementById("roofPitchRatioError"); lengthError.textContent = ""; widthError.textContent = ""; pitchError.textContent = ""; var isValid = true; if (isNaN(roofLength) || roofLength <= 0) { lengthError.textContent = "Please enter a valid positive number for roof length."; isValid = false; } if (isNaN(roofWidth) || roofWidth <= 0) { widthError.textContent = "Please enter a valid positive number for roof width."; isValid = false; } var rise = 0; var run = 0; if (roofPitchRatioStr) { var parts = roofPitchRatioStr.split('/'); if (parts.length === 2) { rise = parseFloat(parts[0]); run = parseFloat(parts[1]); if (isNaN(rise) || isNaN(run) || run === 0 || rise 0 ? containerWidth : 600; // drawChart(); });

Leave a Comment