Sizing Tires Calculator

Tire Sizing Calculator: Find Your Perfect Tire Fit :root { –primary-color: #004a99; –success-color: #28a745; –background-color: #f8f9fa; –text-color: #333; –border-color: #ccc; –card-background: #fff; –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; justify-content: center; padding-top: 20px; padding-bottom: 40px; } .container { max-width: 960px; width: 100%; background-color: var(–card-background); padding: 30px; border-radius: 8px; box-shadow: 0 4px 15px var(–shadow-color); margin: 20px; } h1, h2, h3 { color: var(–primary-color); text-align: center; margin-bottom: 20px; } h1 { font-size: 2.2em; } h2 { font-size: 1.8em; } h3 { font-size: 1.4em; } .calculator-wrapper { background-color: var(–card-background); padding: 25px; border-radius: 8px; box-shadow: 0 2px 10px var(–shadow-color); margin-bottom: 30px; } .input-group { margin-bottom: 20px; display: flex; flex-direction: column; } .input-group label { display: block; margin-bottom: 8px; font-weight: 600; color: var(–primary-color); } .input-group input[type="number"], .input-group select { width: 100%; padding: 12px; border: 1px solid var(–border-color); border-radius: 5px; font-size: 1em; box-sizing: border-box; transition: border-color 0.3s ease; } .input-group input[type="number"]:focus, .input-group select:focus { border-color: var(–primary-color); outline: none; } .input-group small { display: block; margin-top: 8px; font-size: 0.85em; color: #6c757d; } .error-message { color: #dc3545; font-size: 0.9em; margin-top: 5px; display: none; /* Hidden by default */ } .button-group { display: flex; justify-content: space-between; margin-top: 20px; gap: 10px; } button { padding: 12px 20px; border: none; border-radius: 5px; cursor: pointer; font-size: 1em; font-weight: 600; transition: background-color 0.3s ease, transform 0.2s ease; flex: 1; } button.primary { background-color: var(–primary-color); color: white; } button.primary:hover { background-color: #003b75; transform: translateY(-1px); } button.secondary { background-color: #6c757d; color: white; } button.secondary:hover { background-color: #5a6268; transform: translateY(-1px); } .result-group { margin-top: 30px; padding: 20px; background-color: var(–primary-color); color: white; border-radius: 8px; text-align: center; box-shadow: 0 2px 8px rgba(0, 74, 153, 0.3); } .result-group h3 { color: white; margin-bottom: 15px; } .result-group .main-result { font-size: 2.5em; font-weight: bold; margin-bottom: 10px; } .result-group .result-label { font-size: 1.1em; opacity: 0.9; } .intermediate-results { margin-top: 20px; display: flex; flex-wrap: wrap; justify-content: space-around; gap: 15px; text-align: center; } .intermediate-results div { background-color: rgba(255, 255, 255, 0.15); padding: 10px 15px; border-radius: 5px; flex: 1; min-width: 120px; } .intermediate-results .value { font-size: 1.5em; font-weight: bold; display: block; } .intermediate-results .label { font-size: 0.9em; opacity: 0.9; } .explanation { margin-top: 20px; font-size: 0.95em; color: #555; text-align: center; font-style: italic; } .table-responsive { overflow-x: auto; margin-top: 30px; margin-bottom: 30px; border-radius: 8px; box-shadow: 0 2px 10px var(–shadow-color); } table { width: 100%; border-collapse: collapse; min-width: 600px; /* Ensures horizontal scroll on mobile */ } table caption { font-size: 1.1em; font-weight: bold; color: var(–primary-color); margin-bottom: 15px; text-align: left; caption-side: top; } th, td { padding: 12px 15px; text-align: center; border: 1px solid #dee2e6; } thead th { background-color: var(–primary-color); color: white; font-weight: bold; } tbody tr:nth-child(even) { background-color: #f2f2f2; } tbody td { background-color: white; } .chart-container { margin-top: 30px; margin-bottom: 30px; background-color: var(–card-background); padding: 20px; border-radius: 8px; box-shadow: 0 2px 10px var(–shadow-color); text-align: center; } .chart-container canvas { max-width: 100%; height: auto; } .chart-container caption { font-size: 1.1em; font-weight: bold; color: var(–primary-color); margin-bottom: 15px; } .article-section { margin-top: 40px; margin-bottom: 40px; } .article-section h2, .article-section h3 { text-align: left; margin-bottom: 15px; } .article-section p { margin-bottom: 15px; color: #555; } .article-section ul, .article-section ol { margin-left: 20px; margin-bottom: 15px; color: #555; } .article-section li { margin-bottom: 8px; } .article-section .variable-table { width: 100%; border-collapse: collapse; margin-top: 20px; margin-bottom: 20px; box-shadow: 0 2px 8px var(–shadow-color); } .article-section .variable-table th, .article-section .variable-table td { border: 1px solid var(–border-color); padding: 10px; text-align: left; } .article-section .variable-table th { background-color: var(–primary-color); color: white; } .article-section .variable-table tr:nth-child(even) { background-color: #f9f9f9; } .faq-section .question { font-weight: bold; color: var(–primary-color); margin-top: 15px; margin-bottom: 5px; } .faq-section .answer { margin-bottom: 15px; color: #555; } .related-tools { background-color: var(–card-background); padding: 25px; border-radius: 8px; box-shadow: 0 2px 10px var(–shadow-color); margin-top: 40px; } .related-tools h3 { text-align: left; margin-bottom: 20px; } .related-tools ul { list-style: none; padding: 0; } .related-tools li { margin-bottom: 15px; } .related-tools a { color: var(–primary-color); text-decoration: none; font-weight: 600; } .related-tools a:hover { text-decoration: underline; } .related-tools p { font-size: 0.9em; color: #666; margin-top: 5px; } /* Scrollable table styling */ .table-responsive { position: relative; overflow-x: auto; -webkit-overflow-scrolling: touch; } /* Responsive chart */ .chart-container canvas { display: block; /* Remove extra space below canvas */ } /* Mobile specific adjustments */ @media (max-width: 768px) { .container { margin: 10px; padding: 20px; } h1 { font-size: 1.8em; } h2 { font-size: 1.5em; } button { padding: 10px 15px; font-size: 0.95em; } .result-group .main-result { font-size: 2em; } .intermediate-results .value { font-size: 1.3em; } th, td { padding: 10px; } table { min-width: 400px; } /* Adjust for smaller screens */ .button-group { flex-direction: column; } .button-group button { width: 100%; } } /* General utility for hiding elements */ .hidden { display: none !important; }

Tire Sizing Calculator

Effortlessly find the right tire size for your vehicle. Input your current tire details or vehicle specifications to see compatible tire dimensions, understand their impact on your car, and make informed decisions.

Tire Size Calculator

The overall diameter of your current tire. Typically found on the tire sidewall or in your vehicle's manual.
The desired overall diameter for your new tires. Consider your vehicle's clearance and intended use.

What is Tire Sizing?

Tire sizing refers to the process of selecting and fitting tires of specific dimensions onto a vehicle. It involves understanding the complex interplay between tire diameter, width, sidewall height, and the vehicle's wheel size. The correct tire size is crucial for vehicle performance, safety, handling, fuel efficiency, and speedometer accuracy. When you change your tire size, you are fundamentally altering the rotational dynamics of your vehicle's drivetrain. This calculator helps you quantify these changes so you can make informed decisions about fitting larger or smaller tires. This is especially relevant for off-roading enthusiasts, performance driving, or simply when replacing worn-out tires.

Who Should Use It:

  • Vehicle owners looking to upgrade their tires (e.g., larger tires for off-roading or increased ground clearance).
  • Drivers who need to replace tires and want to ensure they maintain or improve their vehicle's performance.
  • Individuals concerned about speedometer accuracy after a tire change.
  • Anyone curious about the physical impact of different tire sizes on their vehicle.

Common Misconceptions:

  • "Bigger tires always mean better performance." Not necessarily. Oversized tires can negatively impact fuel economy, acceleration, handling, and braking if not properly matched to the vehicle's power and gearing.
  • "Any tire size can fit any rim." While there's some flexibility, tires and rims have specific size compatibility requirements to ensure a secure and safe fit.
  • "Tire size changes only affect the look." Tire size has significant effects on speedometer readings, odometer accuracy, ABS and stability control systems, and drivetrain stress.

Tire Sizing Formula and Mathematical Explanation

The core of tire sizing calculations revolves around understanding the overall diameter of the tire and how changes in diameter affect various vehicle parameters. The overall tire diameter is the most critical metric for determining compatibility and impact.

Formula Explanation:

The calculator uses a simplified approach focusing on the direct impact of overall tire diameter change. The primary outputs are derived from the difference between the new and old tire diameters.

  • Diameter Difference: This is the most straightforward calculation, showing the absolute change in inches.
    Diameter Difference = New Tire Diameter - Current Tire Diameter
  • Speedometer Correction: When tire diameter changes, the number of rotations per mile changes. A larger tire covers more ground per rotation, making the speedometer read slower than the actual speed. The percentage correction indicates how much faster you are *actually* traveling compared to what the speedometer shows.
    Speedometer Correction (%) = ((New Tire Diameter / Current Tire Diameter) - 1) * 100%
  • Tire Height Change: This refers to the change in the vertical distance from the ground to the vehicle's chassis due to the tire diameter.
    Tire Height Change = (New Tire Diameter - Current Tire Diameter) / 2
  • Wheel Well Clearance Change: This is essentially the same as the tire height change, representing how much more or less clearance you have under the wheel well.
    Wheel Well Clearance Change = Tire Height Change

Variables Table:

Variable Meaning Unit Typical Range
Current Tire Diameter The overall diameter of the tire currently installed on the vehicle. Inches (in) 20 – 40 inches
New Tire Diameter The desired overall diameter of the new tire to be installed. Inches (in) 20 – 40 inches
Diameter Difference The absolute difference between the new and current tire diameters. Inches (in) -10 to +10 inches (can vary widely)
Speedometer Correction Percentage by which the speedometer reading deviates from the actual speed. Positive indicates actual speed is higher. Percent (%) -20% to +20% (commonly within +/- 5%)
Tire Height Change The change in the tire's radius, affecting ground clearance. Inches (in) -5 to +5 inches
Wheel Well Clearance Change The change in space between the top of the tire and the wheel well. Inches (in) -5 to +5 inches

Practical Examples (Real-World Use Cases)

Example 1: Upgrading for Off-Roading

A Jeep Wrangler owner wants to install larger, more aggressive tires for off-road adventures. Their current tires have an overall diameter of 31 inches, and they are considering tires with an overall diameter of 33 inches.

Inputs:

  • Current Tire Diameter: 31 inches
  • New Tire Diameter: 33 inches

Calculated Results:

  • Diameter Difference: 2 inches
  • Speedometer Correction: +6.45% (Vehicle travels ~6.45% faster than speedometer indicates)
  • Tire Height Change: 1 inch (Vehicle will sit 1 inch higher)
  • Wheel Well Clearance Change: 1 inch

Interpretation: The new 33-inch tires will lift the vehicle by approximately 1 inch, improving ground clearance. However, the speedometer will read lower than the actual speed. The driver must be mindful of this and potentially recalibrate their speedometer or mentally adjust their speed. This upgrade is common for off-roaders needing more clearance.

Example 2: Replacing Standard Tires

A sedan owner needs to replace their worn tires. The current tires have an overall diameter of 25 inches. They decide to stick with the manufacturer's recommended size, which also has an overall diameter of 25 inches.

Inputs:

  • Current Tire Diameter: 25 inches
  • New Tire Diameter: 25 inches

Calculated Results:

  • Diameter Difference: 0 inches
  • Speedometer Correction: 0% (Speedometer remains accurate)
  • Tire Height Change: 0 inches (Vehicle height remains unchanged)
  • Wheel Well Clearance Change: 0 inches

Interpretation: By choosing tires with the same diameter, the owner ensures that their vehicle's performance characteristics, including speedometer accuracy, fuel economy, and handling, remain unchanged. This is the standard and safest approach when replacing tires without intending to modify the vehicle's setup.

How to Use This Tire Sizing Calculator

Using our tire sizing calculator is simple and provides valuable insights into how different tire dimensions will affect your vehicle. Follow these steps:

  1. Locate Current Tire Diameter: Find the overall diameter of your vehicle's current tires. This is often stamped on the tire sidewall (look for the tire size code like P215/65R15 and calculate it, or find it in your owner's manual). If you know the tire size code (e.g., P215/65R15), you can calculate the diameter:
    Diameter (in) = Rim Diameter (in) + (2 * Section Width (mm) * Aspect Ratio (%)) / 25.4
    For example, P215/65R15: 15 + (2 * 215 * 0.65) / 25.4 ≈ 15 + 27.95 ≈ 27.95 inches.
    Enter this value into the "Current Tire Diameter" field.
  2. Determine New Tire Diameter: Identify the overall diameter of the new tires you are considering. If you know the tire size code for the new tires, perform the same calculation as above. Enter this value into the "New Tire Diameter" field.
  3. Click Calculate: Press the "Calculate" button. The calculator will instantly process the data.
  4. Read the Results:
    • Diameter Difference: Shows the net change in tire diameter in inches. A positive number means the new tires are larger; a negative number means they are smaller.
    • Speedometer Correction: This critical value indicates how your speedometer will be affected. A positive percentage means your actual speed is higher than what your speedometer shows (e.g., +5% means you're going 55 mph when the speedometer reads 52.4 mph). A negative percentage means your actual speed is lower.
    • Tire Height Change / Wheel Well Clearance Change: These values show how much the vehicle's ride height will change due to the new tire diameter. A positive number means the vehicle will sit higher, potentially offering more ground clearance but requiring sufficient wheel well space.
  5. Interpret and Decide: Use the results to understand the implications of the tire size change. Ensure the new tires will physically fit without rubbing, that the speedometer accuracy is acceptable or can be corrected, and that the impact on performance and fuel economy is understood.
  6. Copy Results: If you need to save or share the calculated figures, click the "Copy Results" button.
  7. Reset: To start over with new values, click the "Reset" button.

Key Factors That Affect Tire Sizing Results

While the calculator provides essential data based on tire diameter, several other factors influence the overall suitability and impact of a tire size change:

  1. Wheel Diameter: The size of the wheel the tire mounts on directly affects the overall tire diameter calculation. Changing both wheel and tire size requires a complete recalculation. This calculator assumes the wheel diameter remains constant or is accounted for within the input diameters.
  2. Tire Width (Section Width): Wider tires increase the contact patch, potentially improving grip but also affecting steering feel and fuel economy. They can also cause rubbing issues if the vehicle's body or suspension components are not designed for them.
  3. Aspect Ratio (Sidewall Height): This percentage determines the tire's sidewall height relative to its width. A lower aspect ratio means a shorter, stiffer sidewall, while a higher aspect ratio means a taller, more flexible sidewall, impacting ride comfort and handling characteristics.
  4. Vehicle Load Capacity: Ensure any new tires meet or exceed the vehicle manufacturer's recommended load index rating. Overloading tires can lead to premature failure and safety hazards.
  5. Speed Rating: Tires have speed ratings indicating the maximum speed they are designed to safely handle. Ensure the new tires have a speed rating appropriate for your vehicle's capabilities.
  6. Gearing Ratio: Larger tires increase the effective gear ratio (making it "taller"). This can reduce acceleration and strain the engine and transmission, especially on less powerful vehicles. Smaller tires make the effective gear ratio "shorter," improving acceleration but potentially reducing top speed and increasing RPMs at highway cruising speeds. Consider our Gear Ratio Calculator for more details.
  7. Suspension and Drivetrain: The vehicle's existing suspension geometry, brake system, and drivetrain components must be compatible with larger or smaller tires. For instance, ABS and traction control systems rely on accurate wheel speed signals, which can be compromised by significant tire size changes.
  8. Fuel Economy: Larger, heavier tires generally require more energy to rotate, leading to reduced fuel efficiency.
  9. Ride Comfort and Noise: Tire tread patterns, sidewall construction, and overall diameter affect the smoothness of the ride and the amount of road noise generated. Taller sidewalls (from larger overall diameters) often provide a more comfortable ride.

Frequently Asked Questions (FAQ)

Q1: How do I calculate the overall diameter of my current tire?

If you know the tire size code (e.g., P215/65R15), you can calculate it: Diameter (in) = Rim Diameter (in) + (2 * Section Width (mm) * Aspect Ratio (%)) / 25.4. For P215/65R15, it's 15 + (2 * 215 * 0.65) / 25.4 ≈ 27.95 inches. Check your vehicle manual or tire sidewall for the code.

Q2: What happens if my speedometer is inaccurate after changing tire size?

An inaccurate speedometer can lead to speeding tickets, inaccurate fuel economy calculations, and improper operation of systems like cruise control. You may need to have your speedometer recalibrated by a professional or use a device that electronically corrects the signal based on the new tire size. Our calculator's "Speedometer Correction" value helps you estimate this deviation.

Q3: Can I fit significantly larger tires than stock?

Yes, but it often requires modifications. Significantly larger tires may rub against the fenders, suspension components, or brake lines. You might need a suspension lift kit, fender modifications, or wheel spacers to accommodate them safely. Always check for clearance issues.

Q4: Does changing tire size affect my car's warranty?

Potentially, yes. If the tire size change causes damage to drivetrain components (engine, transmission, differentials) or suspension, the manufacturer may deny warranty claims related to that damage. Consult your warranty documentation or dealer.

Q5: Will larger tires improve my off-road capability?

Larger tires generally improve off-road capability by increasing ground clearance and offering better traction on uneven terrain. However, overly large tires can negatively impact articulation and may require gearing changes to maintain adequate power.

Q6: What is the ideal aspect ratio for my vehicle?

The ideal aspect ratio is determined by the manufacturer for optimal balance between performance, comfort, and handling. Lower aspect ratios offer better road feel and handling but a harsher ride. Higher aspect ratios provide more comfort and shock absorption but can feel less precise. Stick close to the OEM recommendation unless you have specific performance goals.

Q7: Can I mix different tire sizes on my vehicle?

It is strongly advised NOT to mix tire sizes between the front and rear axles, especially on vehicles with all-wheel drive or four-wheel drive systems, as this can cause severe damage to the drivetrain. Even on front-wheel or rear-wheel drive vehicles, mixing sizes can lead to unpredictable handling and instability.

Q8: How often should I check my tire pressure after changing size?

Tire pressure should be checked regularly (at least monthly) regardless of size. However, with new or oversized tires, pay extra attention to ensure they are inflated to the recommended pressure for optimal performance, safety, and wear. Check the vehicle's placard (usually on the driver's doorjamb) for correct pressure, not the sidewall maximum.

Tire Diameter Calculation Example
Component Formula Example Calculation (P215/65R15) Result
Section Width (mm) From tire code (e.g., 215) 215 mm 215 mm
Aspect Ratio (%) From tire code (e.g., 65) 65% or 0.65 0.65
Sidewall Height (in) (Section Width * Aspect Ratio) / 25.4 (215 * 0.65) / 25.4 5.47 inches
Rim Diameter (in) From tire code (e.g., 15) 15 inches 15 inches
Overall Tire Diameter (in) Rim Diameter + (2 * Sidewall Height) 15 + (2 * 5.47) 25.94 inches
Tire Diameter vs. Speedometer Error Comparison

© 2023 Your Financial Website. All rights reserved.

var ctx; var myChart; function initializeChart() { ctx = document.getElementById('tireSizeChart').getContext('2d'); myChart = new Chart(ctx, { type: 'bar', data: { labels: ['Diameter Change', 'Speedometer Error (%)', 'Ride Height Change'], datasets: [{ label: 'Tire Size Impact', data: [0, 0, 0], backgroundColor: [ 'rgba(0, 74, 153, 0.6)', 'rgba(40, 167, 69, 0.6)', 'rgba(255, 193, 7, 0.6)' ], borderColor: [ 'rgba(0, 74, 153, 1)', 'rgba(40, 167, 69, 1)', 'rgba(255, 193, 7, 1)' ], borderWidth: 1 }] }, options: { responsive: true, maintainAspectRatio: false, scales: { y: { beginAtZero: true, ticks: { callback: function(value) { if (this.chart.data.datasets[0].label === 'Tire Size Impact') { if (value % 1 === 0) { // Show integers if possible return value; } else { return value.toFixed(1); // Show one decimal for non-integers } } return value; } } } }, plugins: { legend: { position: 'top', }, title: { display: true, text: 'Impact of Tire Size Change' } } } }); } function updateChart(diameterDiff, speedometerCorrection, heightChange) { if (myChart) { myChart.data.datasets[0].data = [ diameterDiff, speedometerCorrection, heightChange ]; myChart.options.scales.y.ticks.callback = function(value) { if (Math.abs(value) < 1) { return value.toFixed(2); // More precision for small values } return value.toFixed(1); }; myChart.update(); } } function validateInput(id, errorId, minValue, maxValue) { var input = document.getElementById(id); var errorDiv = document.getElementById(errorId); var value = parseFloat(input.value); var isValid = true; errorDiv.style.display = 'none'; input.style.borderColor = '#ccc'; if (isNaN(value)) { errorDiv.textContent = "Please enter a valid number."; errorDiv.style.display = 'block'; input.style.borderColor = '#dc3545'; isValid = false; } else if (value <= 0) { errorDiv.textContent = "Value must be positive."; errorDiv.style.display = 'block'; input.style.borderColor = '#dc3545'; isValid = false; } else if (minValue !== undefined && value maxValue) { errorDiv.textContent = "Value must be no more than " + maxValue + "."; errorDiv.style.display = 'block'; input.style.borderColor = '#dc3545'; isValid = false; } return isValid; } function calculateTireSize() { var currentTireDiameterInput = document.getElementById('currentTireDiameter'); var newTireDiameterInput = document.getElementById('newTireDiameter'); var resultsSection = document.getElementById('resultsSection'); var mainResultDiv = document.getElementById('mainResult'); var speedometerCorrectionDiv = document.getElementById('speedometerCorrection'); var tireHeightChangeDiv = document.getElementById('tireHeightChange'); var wheelWellClearanceDiv = document.getElementById('wheelWellClearance'); var isValidCurrent = validateInput('currentTireDiameter', 'currentTireDiameterError', 1); var isValidNew = validateInput('newTireDiameter', 'newTireDiameterError', 1); if (!isValidCurrent || !isValidNew) { resultsSection.classList.add('hidden'); return; } var currentTireDiameter = parseFloat(currentTireDiameterInput.value); var newTireDiameter = parseFloat(newTireDiameterInput.value); var diameterDifference = newTireDiameter – currentTireDiameter; var speedometerCorrection = ((newTireDiameter / currentTireDiameter) – 1) * 100; var tireHeightChange = diameterDifference / 2; var wheelWellClearanceChange = tireHeightChange; // Same as tire height change mainResultDiv.textContent = diameterDifference.toFixed(2) + " inches"; speedometerCorrectionDiv.textContent = speedometerCorrection.toFixed(2) + "%"; tireHeightChangeDiv.textContent = tireHeightChange.toFixed(2) + " inches"; wheelWellClearanceDiv.textContent = wheelWellClearanceChange.toFixed(2) + " inches"; resultsSection.classList.remove('hidden'); // Update Chart Data updateChart(diameterDifference, speedometerCorrection, tireHeightChange); } function resetForm() { document.getElementById('currentTireDiameter').value = '26.5'; // Sensible default document.getElementById('newTireDiameter').value = '30'; // Sensible default document.getElementById('currentTireDiameterError').style.display = 'none'; document.getElementById('newTireDiameterError').style.display = 'none'; document.getElementById('currentTireDiameter').style.borderColor = '#ccc'; document.getElementById('newTireDiameter').style.borderColor = '#ccc'; document.getElementById('resultsSection').classList.add('hidden'); if (myChart) { updateChart(0, 0, 0); // Reset chart data } } function copyResults() { var mainResult = document.getElementById('mainResult').textContent; var speedometerCorrection = document.getElementById('speedometerCorrection').textContent; var tireHeightChange = document.getElementById('tireHeightChange').textContent; var wheelWellClearance = document.getElementById('wheelWellClearance').textContent; var currentTireDiameter = document.getElementById('currentTireDiameter').value; var newTireDiameter = document.getElementById('newTireDiameter').value; var resultsText = "Tire Size Comparison Results:\n\n"; resultsText += "Current Tire Diameter: " + currentTireDiameter + " inches\n"; resultsText += "New Tire Diameter: " + newTireDiameter + " inches\n\n"; resultsText += "Diameter Difference: " + mainResult + "\n"; resultsText += "Speedometer Correction: " + speedometerCorrection + "\n"; resultsText += "Tire Height Change: " + tireHeightChange + "\n"; resultsText += "Wheel Well Clearance Change: " + wheelWellClearance + "\n\n"; resultsText += "Calculated using the Tire Sizing Calculator."; navigator.clipboard.writeText(resultsText).then(function() { // Optional: Provide user feedback that copy was successful // alert("Results copied to clipboard!"); }).catch(function(err) { console.error('Failed to copy results: ', err); // alert("Failed to copy results. Please copy manually."); }); } // Initialize chart on page load window.onload = function() { // Check if Chart.js is available globally if (typeof Chart === 'undefined') { console.error("Chart.js is not loaded. Please include Chart.js library."); // Optionally, display a message to the user document.getElementById('tireSizeChart').parentNode.innerHTML = "Chart library not loaded. Please ensure Chart.js is included."; } else { initializeChart(); // Calculate with default values if they exist, otherwise wait for user input if (document.getElementById('currentTireDiameter').value && document.getElementById('newTireDiameter').value) { calculateTireSize(); } } };

Leave a Comment