Fox Suspension Calculator: Optimize Your Mountain Bike Ride
Welcome to the ultimate Fox Suspension Calculator! This tool helps mountain bikers dial in their Fox forks and shocks for optimal performance. By inputting your rider weight, bike’s suspension travel, and riding style, you’ll receive personalized recommendations for air pressure, sag, rebound, and compression settings. Achieve a balanced, controlled, and comfortable ride tailored to your specific needs with our Fox Suspension Calculator.
Fox Suspension Setup Calculator
| Setting | XC (Cross Country) | Trail Riding | Enduro Riding | DH (Downhill) |
|---|---|---|---|---|
| Fork Sag | 15-20% | 20-25% | 25-30% | 28-32% |
| Shock Sag | 20-25% | 25-30% | 30-35% | 30-35% |
| Rebound Damping | Faster (more open clicks) | Balanced | Slower (fewer open clicks) | Slower (fewer open clicks) |
| Compression Damping | Firmer (more closed clicks) | Balanced | Softer (more open clicks) | Softer (more open clicks) |
| Air Pressure | Higher for support | Balanced | Lower for grip/comfort | Lower for grip/comfort |
What is a Fox Suspension Calculator?
A Fox Suspension Calculator is an essential online tool designed to help mountain bike riders determine the optimal setup for their Fox brand suspension components, including forks and rear shocks. It takes into account critical factors such as rider weight, the specific model of the Fox suspension, its travel, and the rider’s intended riding style. The calculator then provides recommended starting points for key settings like air pressure (PSI), sag percentage, rebound damping clicks, and compression damping clicks.
Who should use it: Every mountain biker with Fox suspension components can benefit from a Fox Suspension Calculator. It’s particularly useful for:
- New bike owners: To get a solid baseline setup right out of the box.
- Experienced riders: For fine-tuning their setup for different terrains or riding conditions, or after changing components.
- Riders changing weight: As rider weight significantly impacts suspension performance, recalculating settings after weight changes is crucial.
- Anyone seeking better performance: A properly set up suspension dramatically improves comfort, control, and efficiency on the trail.
Common misconceptions:
- “Set it and forget it”: Suspension settings are dynamic. They might need minor adjustments based on trail conditions, riding style evolution, or even temperature changes.
- “More air pressure is always better”: While higher pressure can prevent bottom-outs, too much can make the ride harsh, reduce grip, and prevent full travel utilization.
- “Copying pro rider settings”: Pro riders have unique styles, weights, and often custom-tuned suspension. Their settings are rarely ideal for the average rider.
- “Damping is just for comfort”: Rebound and compression damping are critical for controlling how the suspension reacts to bumps and how the bike handles. Incorrect damping can lead to a pogo-stick feel or a harsh, unresponsive ride.
Fox Suspension Calculator Formula and Mathematical Explanation
The Fox Suspension Calculator uses a combination of empirical data, general guidelines provided by Fox Racing Shox, and mathematical relationships to derive its recommendations. While the exact proprietary algorithms used by Fox are not public, the calculator simulates these recommendations based on common industry practices and rider feedback.
The core idea is to match the spring rate (air pressure) and damping characteristics to the rider’s weight and how aggressively they ride.
Step-by-step derivation:
- Rider Weight Conversion: If the rider inputs weight in pounds (lbs), it’s converted to kilograms (kg) for consistency in internal calculations, or vice-versa if the base data is in lbs. (1 kg = 2.20462 lbs).
- Air Pressure (PSI) Calculation: This is primarily a linear relationship with rider weight, adjusted by the specific fork/shock model. Different models have different air spring volumes and leverage ratios, requiring varying PSI for the same rider weight.
Air Pressure (PSI) = (Rider Weight in kg * Weight_Factor_Model) + Base_Offset_Model
TheWeight_Factor_ModelandBase_Offset_Modelare lookup values specific to each Fox fork (e.g., Fox 32, 34, 36) and shock (e.g., DPS, DPX2, X2). Heavier-duty components generally require slightly higher PSI per kg. - Sag Percentage Determination: Sag is the amount the suspension compresses under the rider’s static weight. The ideal sag percentage is primarily determined by the riding style.
Recommended Sag % = Lookup_Value_by_Riding_Style
For example, XC typically uses 15-20% sag for efficiency, while Enduro/DH uses 25-35% for better small bump compliance and traction. - Sag in Millimeters (mm): Once the sag percentage is determined, it’s converted to a physical measurement based on the component’s total travel.
Sag (mm) = (Recommended Sag % / 100) * Total Travel (mm) - Rebound Damping Clicks: Rebound controls how quickly the suspension extends after compression. This is inversely related to rider weight (heavier riders need slower rebound, i.e., fewer clicks from closed) and adjusted by riding style.
Rebound Clicks = Base_Rebound_Clicks - (Rider Weight in kg - Avg_Weight) * Rebound_Adjustment_Factor + Style_Offset
Fewer clicks from closed means slower rebound. - Compression Damping Clicks: Compression controls how quickly the suspension compresses. This is heavily influenced by riding style (XC often uses more compression damping for pedaling efficiency, DH uses less for plushness) and slightly by rider weight.
Compression Clicks = Base_Compression_Clicks + Style_Adjustment_Factor + (Rider Weight in kg - Avg_Weight) * Compression_Adjustment_Factor
More clicks from closed (or open, depending on the system) means more damping.
Variables Table:
| Variable | Meaning | Unit | Typical Range |
|---|---|---|---|
| Rider Weight | Weight of the rider with full gear | kg / lbs | 30 – 150 kg (66 – 330 lbs) |
| Fork Model | Specific Fox fork series (e.g., 34, 36) | N/A | Fox 32, 34, 36, 38, 40 |
| Fork Travel | Maximum compression distance of the fork | mm | 80 – 200 mm |
| Shock Model | Specific Fox rear shock series (e.g., DPS, X2) | N/A | Float DPS, DPX2, X2 |
| Shock Travel | Maximum compression distance of the rear shock | mm | 30 – 75 mm |
| Riding Style | Intended use of the bike | N/A | XC, Trail, Enduro, Downhill |
| Air Pressure | Pressure in the air spring chamber | PSI | 40 – 180 PSI |
| Sag | Suspension compression under rider’s weight | % / mm | 15 – 35% |
| Rebound Clicks | Number of clicks from fully closed (slowest) | Clicks | 3 – 15 clicks |
| Compression Clicks | Number of clicks from fully closed (firmest) | Clicks | 0 – 10 clicks |
Practical Examples of Using the Fox Suspension Calculator
Let’s look at a couple of real-world scenarios to understand how the Fox Suspension Calculator provides valuable starting points for your mountain bike setup.
Example 1: Trail Rider Setup
Sarah is a keen trail rider who recently bought a new bike equipped with a Fox 34 fork and a Fox Float DPX2 rear shock. She weighs 68 kg (150 lbs) with all her gear. Her fork has 140mm of travel, and her shock has a 55mm stroke. She primarily rides technical singletrack and wants a balanced setup.
- Inputs:
- Rider Weight: 68 kg
- Fork Model: Fox 34
- Fork Travel: 140 mm
- Shock Model: Fox Float DPX2
- Shock Travel: 55 mm
- Riding Style: Trail Riding
- Fox Suspension Calculator Outputs:
- Fork Air Pressure: ~75 PSI
- Fork Sag: ~30 mm (21%)
- Fork Rebound: ~8 Clicks from closed
- Fork Compression: ~4 Clicks from closed
- Shock Air Pressure: ~150 PSI
- Shock Sag: ~15 mm (27%)
- Shock Rebound: ~7 Clicks from closed
- Shock Compression: ~5 Clicks from closed
Interpretation: These settings give Sarah a great starting point. The 21% fork sag and 27% shock sag are ideal for trail riding, offering a good balance of small bump compliance and mid-stroke support. The rebound and compression settings are moderate, allowing for quick adjustments on the trail to suit her preferences and specific trail features. She can now hit the trails, test these settings, and make minor tweaks for her perfect feel.
Example 2: Enduro Racer Setup
Mark is an enduro racer weighing 85 kg (187 lbs) with his full race kit. His bike features a Fox 38 fork with 170mm travel and a Fox Float X2 rear shock with a 65mm stroke. He needs a setup that can handle big hits, maintain traction on steep descents, and still pedal efficiently.
- Inputs:
- Rider Weight: 85 kg
- Fork Model: Fox 38
- Fork Travel: 170 mm
- Shock Model: Fox Float X2
- Shock Travel: 65 mm
- Riding Style: Enduro Riding
- Fox Suspension Calculator Outputs:
- Fork Air Pressure: ~98 PSI
- Fork Sag: ~47 mm (28%)
- Fork Rebound: ~6 Clicks from closed
- Fork Compression: ~7 Clicks from closed
- Shock Air Pressure: ~185 PSI
- Shock Sag: ~21 mm (32%)
- Shock Rebound: ~5 Clicks from closed
- Shock Compression: ~8 Clicks from closed
Interpretation: For Mark’s enduro racing, the Fox Suspension Calculator suggests higher sag percentages (28% fork, 32% shock) to provide excellent small bump compliance and deep travel for absorbing large impacts. The lower rebound clicks (slower rebound) are crucial for controlling the bike on fast, rough descents and preventing it from bucking. The more open compression settings allow the suspension to move freely, absorbing hits and maintaining traction. These settings provide a robust foundation for Mark to fine-tune his race setup.
How to Use This Fox Suspension Calculator
Using the Fox Suspension Calculator is straightforward and designed to get you on the trail with confidence. Follow these steps to get your personalized suspension settings:
- Enter Rider Weight: Input your weight in kilograms or pounds, including all your typical riding gear (helmet, hydration pack, shoes, etc.). Accuracy here is crucial for correct air pressure recommendations.
- Select Fork Model: Choose your specific Fox fork model from the dropdown list (e.g., Fox 34, Fox 36). Different models have different internal characteristics.
- Enter Fork Travel (mm): Find the travel of your front fork, usually printed on the fork stanchion or in your bike’s specifications.
- Select Shock Model: Choose your specific Fox rear shock model (e.g., Fox Float DPS, Fox Float X2).
- Enter Shock Travel (mm): This refers to the shock’s stroke length, not the bike’s rear wheel travel. It’s typically found on the shock body or in your bike’s manual.
- Select Riding Style: Choose the option that best describes your primary riding style (e.g., Cross Country, Trail, Enduro, Downhill). This significantly influences sag and damping preferences.
- Click “Calculate Settings”: Once all fields are filled, click the “Calculate Settings” button. The calculator will instantly display your recommended settings.
- Read Results: The results section will show your recommended Fork Air Pressure (PSI) as the primary highlighted result, along with detailed settings for both your fork and shock, including sag (mm and %), rebound clicks, and compression clicks.
- Apply and Fine-Tune: Use these settings as a starting point. Inflate your fork and shock to the recommended PSI, set your sag, and adjust your rebound and compression clicks. Then, hit the trails and fine-tune based on your feel and the terrain. Remember, these are starting points, and personal preference plays a big role.
- Copy Results: Use the “Copy Results” button to save your calculated settings for future reference or to share.
- Reset Calculator: If you want to start over or try different scenarios, click the “Reset” button to clear all inputs and return to default values.
Key Factors That Affect Fox Suspension Calculator Results
The accuracy and relevance of the Fox Suspension Calculator‘s recommendations depend on several key factors. Understanding these helps you interpret the results and fine-tune your setup effectively.
- Rider Weight: This is the most critical factor. A heavier rider requires more air pressure to achieve the correct sag and prevent bottoming out. Conversely, a lighter rider needs less pressure. The calculator uses your weight to determine the primary spring rate.
- Fork and Shock Model: Different Fox models (e.g., Fox 34 vs. Fox 38, Float DPS vs. Float X2) have varying air spring volumes, damping circuits, and intended uses. A Fox 38, designed for aggressive riding, will have different internal characteristics and recommended settings than a lighter Fox 32 XC fork for the same rider weight.
- Suspension Travel (Fork & Shock): The total travel of your suspension components directly impacts sag measurements. A longer travel fork will have a larger sag measurement in millimeters for the same sag percentage. It also influences the overall feel and intended use of the bike.
- Riding Style/Terrain: Your preferred riding style (XC, Trail, Enduro, DH) dictates the ideal sag percentage and damping characteristics.
- XC: Often prefers less sag (15-20%) and firmer compression for pedaling efficiency and responsiveness.
- Enduro/DH: Typically uses more sag (25-35%) and more open damping for plushness, small bump compliance, and big hit absorption.
- Air Volume Spacers/Tokens: While not a direct input for this basic Fox Suspension Calculator, the number of volume spacers in your fork or shock significantly affects the air spring’s progression. More spacers make the spring ramp up faster, providing more bottom-out resistance. This is a fine-tuning adjustment made after initial setup.
- Trail Conditions: The type of trails you ride can influence minor adjustments. For example, a very rocky, technical trail might benefit from slightly softer compression or faster rebound for better compliance, while a flowy jump trail might prefer a firmer setup for more pop.
Frequently Asked Questions (FAQ) About Fox Suspension Setup
A: Sag is crucial because it allows your suspension to extend into dips and holes, maintaining tire contact with the ground for better traction and control. It also positions the suspension in its most active part of the travel, ready to absorb impacts. Incorrect sag can lead to a harsh ride, poor traction, or frequent bottom-outs.
A: Rebound damping controls how quickly your suspension extends after being compressed. Too fast (too many clicks open) and your bike will feel like a pogo stick; too slow (too few clicks open) and it will pack down on successive hits. Compression damping controls how quickly your suspension compresses. More compression (fewer clicks open) makes the suspension firmer, good for pedaling efficiency; less compression (more clicks open) makes it plusher for absorbing bumps.
A: This Fox Suspension Calculator is specifically tuned for Fox components. While the general principles of sag, air pressure, and damping apply to all suspension, the specific air pressure curves and damping click ranges are unique to Fox. Using it for other brands might give you a rough starting point, but it won’t be as accurate.
A: The calculator provides a recommended starting point. Always verify sag with the recommended air pressure. If the sag is off, adjust the air pressure slightly until you achieve the target sag. Personal preference and specific bike leverage ratios can cause minor deviations from general guidelines. Always prioritize achieving correct sag.
A: It’s a good practice to check your air pressure before every ride, as temperature changes can affect it. Sag should be checked periodically, especially if you change riding gear weight or feel your bike isn’t performing as it should. Damping settings are usually set and forgotten unless you’re riding significantly different terrain or want to experiment.
A: The calculator uses common travel ranges. If your travel is slightly outside, choose the closest option. For example, if you have a 130mm fork, use the 140mm setting as a close approximation. The most important thing is to input your actual travel for accurate sag calculation. The air pressure and damping will scale reasonably well.
A: Volume spacers (or tokens) are used to fine-tune the air spring’s progression. If you’re bottoming out too easily at the correct sag, add a spacer. If you’re not getting full travel and the ride feels harsh at the end, remove a spacer. This is an advanced tuning step after setting initial air pressure and sag with the Fox Suspension Calculator.
A: The Fox Float DPS is a lighter, simpler inline shock typically found on XC and light trail bikes, offering good pedaling efficiency. The Fox Float X2 is a more complex, high-performance shock with a piggyback reservoir, offering extensive adjustability (high/low speed compression and rebound) for aggressive trail, enduro, and downhill riding, providing superior heat management and damping control.
Related Tools and Internal Resources
To further enhance your mountain biking experience and optimize your bike’s performance, explore these other valuable tools and resources:
// Since external libraries are forbidden, I'll create a very basic mock-up of Chart.js functionality
// This will draw lines and points on a canvas, but won't have all the features of Chart.js
function Chart(ctx, config) {
var self = this;
self.ctx = ctx;
self.config = config;
self.data = config.data;
self.options = config.options;
self.destroy = function() {
self.ctx.clearRect(0, 0, self.ctx.canvas.width, self.ctx.canvas.height);
};
self.update = function() {
self.destroy();
self.draw();
};
self.draw = function() {
var canvas = self.ctx.canvas;
var width = canvas.width;
var height = canvas.height;
var padding = 50; // Padding for axes
self.ctx.clearRect(0, 0, width, height);
// Get min/max for scaling
var allData = [];
for (var i = 0; i < self.data.datasets.length; i++) {
allData = allData.concat(self.data.datasets[i].data);
}
var minY = 0; // Always start Y at 0 for pressure
var maxY = Math.max.apply(null, allData) * 1.2; // 20% buffer
if (maxY === 0) maxY = 100; // Default if no data
var minX = Math.min.apply(null, self.data.labels);
var maxX = Math.max.apply(null, self.data.labels);
if (minX === Infinity || maxX === -Infinity) {
minX = 30; maxX = 150; // Default range for rider weight
}
// Draw Y-axis
self.ctx.beginPath();
self.ctx.moveTo(padding, padding);
self.ctx.lineTo(padding, height - padding);
self.ctx.strokeStyle = '#666';
self.ctx.stroke();
// Draw X-axis
self.ctx.beginPath();
self.ctx.moveTo(padding, height - padding);
self.ctx.lineTo(width - padding, height - padding);
self.ctx.strokeStyle = '#666';
self.ctx.stroke();
// Draw Y-axis labels
var numYLabels = 5;
for (var j = 0; j <= numYLabels; j++) {
var yVal = minY + (maxY - minY) * (j / numYLabels);
var yPos = height - padding - (yVal - minY) / (maxY - minY) * (height - 2 * padding);
self.ctx.fillText(Math.round(yVal), padding - 30, yPos + 5);
self.ctx.beginPath();
self.ctx.moveTo(padding - 5, yPos);
self.ctx.lineTo(padding, yPos);
self.ctx.stroke();
}
self.ctx.save();
self.ctx.translate(padding / 2, height / 2);
self.ctx.rotate(-Math.PI / 2);
self.ctx.textAlign = 'center';
self.ctx.fillText(self.options.scales.y.title.text, 0, 0);
self.ctx.restore();
// Draw X-axis labels
var numXLabels = 5;
for (var k = 0; k <= numXLabels; k++) {
var xVal = minX + (maxX - minX) * (k / numXLabels);
var xPos = padding + (xVal - minX) / (maxX - minX) * (width - 2 * padding);
self.ctx.fillText(Math.round(xVal), xPos, height - padding + 20);
self.ctx.beginPath();
self.ctx.moveTo(xPos, height - padding);
self.ctx.lineTo(xPos, height - padding + 5);
self.ctx.stroke();
}
self.ctx.textAlign = 'center';
self.ctx.fillText(self.options.scales.x.title.text, width / 2, height - padding + 40);
// Draw data series
for (var l = 0; l < self.data.datasets.length; l++) {
var dataset = self.data.datasets[l];
self.ctx.beginPath();
self.ctx.strokeStyle = dataset.borderColor;
self.ctx.lineWidth = 2;
for (var m = 0; m < dataset.data.length; m++) {
var xVal = self.data.labels[m];
var yVal = dataset.data[m];
var x = padding + (xVal - minX) / (maxX - minX) * (width - 2 * padding);
var y = height - padding - (yVal - minY) / (maxY - minY) * (height - 2 * padding);
if (m === 0) {
self.ctx.moveTo(x, y);
} else {
self.ctx.lineTo(x, y);
}
self.ctx.arc(x, y, 3, 0, Math.PI * 2); // Draw point
}
self.ctx.stroke();
}
// Draw legend
var legendX = width - padding - 150;
var legendY = padding + 10;
for (var n = 0; n < self.data.datasets.length; n++) {
var dataset = self.data.datasets[n];
self.ctx.fillStyle = dataset.borderColor;
self.ctx.fillRect(legendX, legendY + n * 20, 15, 10);
self.ctx.fillStyle = '#333';
self.ctx.fillText(dataset.label, legendX + 20, legendY + n * 20 + 10);
}
};
self.draw(); // Initial draw
}
function calculateSuspension() {
var riderWeightInput = document.getElementById('riderWeight');
var weightUnit = document.getElementById('weightUnit').value;
var forkModel = document.getElementById('forkModel').value;
var forkTravel = document.getElementById('forkTravel').value;
var shockModel = document.getElementById('shockModel').value;
var shockTravel = document.getElementById('shockTravel').value;
var ridingStyle = document.getElementById('ridingStyle').value;
var riderWeight = parseFloat(riderWeightInput.value);
var forkTravelNum = parseFloat(forkTravel);
var shockTravelNum = parseFloat(shockTravel);
var isValid = true;
// Input validation
if (isNaN(riderWeight) || riderWeight <= 0) {
document.getElementById('riderWeightError').textContent = 'Please enter a valid positive rider weight.';
document.getElementById('riderWeightError').style.display = 'block';
isValid = false;
} else {
document.getElementById('riderWeightError').style.display = 'none';
}
if (isNaN(forkTravelNum) || forkTravelNum <= 0) {
document.getElementById('forkTravelError').textContent = 'Please enter valid positive fork travel.';
document.getElementById('forkTravelError').style.display = 'block';
isValid = false;
} else {
document.getElementById('forkTravelError').style.display = 'none';
}
if (isNaN(shockTravelNum) || shockTravelNum <= 0) {
document.getElementById('shockTravelError').textContent = 'Please enter valid positive shock travel.';
document.getElementById('shockTravelError').style.display = 'block';
isValid = false;
} else {
document.getElementById('shockTravelError').style.display = 'none';
}
if (!isValid) {
document.getElementById('results').style.display = 'none';
return;
}
// Convert weight to KG if in LBS
var riderWeightKg = riderWeight;
if (weightUnit === 'lbs') {
riderWeightKg = riderWeight / 2.20462;
}
// --- Fork Calculations ---
var forkAirPressurePSI = 0;
var forkSagPercent = 0;
var forkReboundClicks = 0;
var forkCompressionClicks = 0;
// Fork Air Pressure (PSI) - Simplified linear model based on rider weight and fork model
// Base PSI/kg factor + offset
var forkPressureFactor = 2.0; // Base for Fox 32
var forkPressureOffset = 10;
if (forkModel === '34') { forkPressureFactor = 2.1; forkPressureOffset = 12; }
else if (forkModel === '36') { forkPressureFactor = 2.2; forkPressureOffset = 15; }
else if (forkModel === '38') { forkPressureFactor = 2.3; forkPressureOffset = 18; }
else if (forkModel === '40') { forkPressureFactor = 2.4; forkPressureOffset = 20; }
forkAirPressurePSI = Math.round((riderWeightKg * forkPressureFactor) + forkPressureOffset);
// Fork Sag Percentage based on riding style
if (ridingStyle === 'XC') { forkSagPercent = 18; }
else if (ridingStyle === 'Trail') { forkSagPercent = 22; }
else if (ridingStyle === 'Enduro') { forkSagPercent = 27; }
else if (ridingStyle === 'DH') { forkSagPercent = 30; }
var forkSagMM = (forkTravelNum * forkSagPercent / 100).toFixed(1);
// Fork Rebound Clicks (from closed/slowest) - Inverse relation to weight, adjusted by style
// Assume max 15 clicks for simplicity
var baseForkRebound = 8; // Mid-range
var weightReboundAdj = Math.round((riderWeightKg - 75) / 10 * -1); // Heavier = fewer clicks (slower)
var styleForkReboundAdj = 0;
if (ridingStyle === 'XC') { styleForkReboundAdj = 1; } // Faster
else if (ridingStyle === 'Enduro') { styleForkReboundAdj = -1; } // Slower
else if (ridingStyle === 'DH') { styleForkReboundAdj = -2; } // Even slower
forkReboundClicks = Math.max(3, Math.min(15, baseForkRebound + weightReboundAdj + styleForkReboundAdj));
// Fork Compression Clicks (from closed/firmest) - Adjusted by style
// Assume max 10 clicks for simplicity
var baseForkCompression = 4;
var styleForkCompressionAdj = 0;
if (ridingStyle === 'XC') { styleForkCompressionAdj = -2; } // Firmer
else if (ridingStyle === 'Enduro') { styleForkCompressionAdj = 2; } // Softer
else if (ridingStyle === 'DH') { styleForkCompressionAdj = 3; } // Even softer
forkCompressionClicks = Math.max(0, Math.min(10, baseForkCompression + styleForkCompressionAdj));
// --- Shock Calculations ---
var shockAirPressurePSI = 0;
var shockSagPercent = 0;
var shockReboundClicks = 0;
var shockCompressionClicks = 0;
// Shock Air Pressure (PSI) - Simplified linear model
var shockPressureFactor = 2.1; // Base for DPS
var shockPressureOffset = 20;
if (shockModel === 'DPX2') { shockPressureFactor = 2.2; shockPressureOffset = 25; }
else if (shockModel === 'X2') { shockPressureFactor = 2.3; shockPressureOffset = 30; }
shockAirPressurePSI = Math.round((riderWeightKg * shockPressureFactor) + shockPressureOffset);
// Shock Sag Percentage based on riding style
if (ridingStyle === 'XC') { shockSagPercent = 22; }
else if (ridingStyle === 'Trail') { shockSagPercent = 28; }
else if (ridingStyle === 'Enduro') { shockSagPercent = 32; }
else if (ridingStyle === 'DH') { shockSagPercent = 33; }
var shockSagMM = (shockTravelNum * shockSagPercent / 100).toFixed(1);
// Shock Rebound Clicks (from closed/slowest)
var baseShockRebound = 7;
var weightShockReboundAdj = Math.round((riderWeightKg - 75) / 10 * -1);
var styleShockReboundAdj = 0;
if (ridingStyle === 'XC') { styleShockReboundAdj = 1; }
else if (ridingStyle === 'Enduro') { styleShockReboundAdj = -1; }
else if (ridingStyle === 'DH') { styleShockReboundAdj = -2; }
shockReboundClicks = Math.max(3, Math.min(15, baseShockRebound + weightShockReboundAdj + styleShockReboundAdj));
// Shock Compression Clicks (from closed/firmest)
var baseShockCompression = 5;
var styleShockCompressionAdj = 0;
if (ridingStyle === 'XC') { styleShockCompressionAdj = -2; }
else if (ridingStyle === 'Enduro') { styleShockCompressionAdj = 2; }
else if (ridingStyle === 'DH') { styleShockCompressionAdj = 3; }
shockCompressionClicks = Math.max(0, Math.min(10, baseShockCompression + styleShockCompressionAdj));
// Display results
document.getElementById('forkAirPressurePSI').textContent = forkAirPressurePSI;
document.getElementById('forkSagMM').textContent = forkSagMM;
document.getElementById('forkSagPercent').textContent = forkSagPercent;
document.getElementById('forkReboundClicks').textContent = forkReboundClicks;
document.getElementById('forkCompressionClicks').textContent = forkCompressionClicks;
document.getElementById('shockAirPressurePSI').textContent = shockAirPressurePSI;
document.getElementById('shockSagMM').textContent = shockSagMM;
document.getElementById('shockSagPercent').textContent = shockSagPercent;
document.getElementById('shockReboundClicks').textContent = shockReboundClicks;
document.getElementById('shockCompressionClicks').textContent = shockCompressionClicks;
document.getElementById('results').style.display = 'block';
// Update chart data
updateChartData(riderWeightKg, forkModel, shockModel);
}
function updateChartData(currentRiderWeightKg, forkModel, shockModel) {
chartLabels = [];
forkPressureData = [];
shockPressureData = [];
var minWeight = 40;
var maxWeight = 120;
var step = 10;
for (var w = minWeight; w <= maxWeight; w += step) {
chartLabels.push(w);
// Recalculate fork pressure for chart
var forkPressureFactor = 2.0;
var forkPressureOffset = 10;
if (forkModel === '34') { forkPressureFactor = 2.1; forkPressureOffset = 12; }
else if (forkModel === '36') { forkPressureFactor = 2.2; forkPressureOffset = 15; }
else if (forkModel === '38') { forkPressureFactor = 2.3; forkPressureOffset = 18; }
else if (forkModel === '40') { forkPressureFactor = 2.4; forkPressureOffset = 20; }
forkPressureData.push(Math.round((w * forkPressureFactor) + forkPressureOffset));
// Recalculate shock pressure for chart
var shockPressureFactor = 2.1;
var shockPressureOffset = 20;
if (shockModel === 'DPX2') { shockPressureFactor = 2.2; shockPressureOffset = 25; }
else if (shockModel === 'X2') { shockPressureFactor = 2.3; shockPressureOffset = 30; }
shockPressureData.push(Math.round((w * shockPressureFactor) + shockPressureOffset));
}
drawChart(chartLabels, forkPressureData, shockPressureData);
}
function resetCalculator() {
document.getElementById('riderWeight').value = '75';
document.getElementById('weightUnit').value = 'kg';
document.getElementById('forkModel').value = '34';
document.getElementById('forkTravel').value = '140';
document.getElementById('shockModel').value = 'DPX2';
document.getElementById('shockTravel').value = '55';
document.getElementById('ridingStyle').value = 'Trail';
document.getElementById('riderWeightError').style.display = 'none';
document.getElementById('forkTravelError').style.display = 'none';
document.getElementById('shockTravelError').style.display = 'none';
document.getElementById('results').style.display = 'none';
// Redraw chart with default values
updateChartData(75, '34', 'DPX2');
}
function copyResults() {
var riderWeight = document.getElementById('riderWeight').value;
var weightUnit = document.getElementById('weightUnit').value;
var forkModel = document.getElementById('forkModel').value;
var forkTravel = document.getElementById('forkTravel').value;
var shockModel = document.getElementById('shockModel').value;
var shockTravel = document.getElementById('shockTravel').value;
var ridingStyle = document.getElementById('ridingStyle').value;
var forkAirPressurePSI = document.getElementById('forkAirPressurePSI').textContent;
var forkSagMM = document.getElementById('forkSagMM').textContent;
var forkSagPercent = document.getElementById('forkSagPercent').textContent;
var forkReboundClicks = document.getElementById('forkReboundClicks').textContent;
var forkCompressionClicks = document.getElementById('forkCompressionClicks').textContent;
var shockAirPressurePSI = document.getElementById('shockAirPressurePSI').textContent;
var shockSagMM = document.getElementById('shockSagMM').textContent;
var shockSagPercent = document.getElementById('shockSagPercent').textContent;
var shockReboundClicks = document.getElementById('shockReboundClicks').textContent;
var shockCompressionClicks = document.getElementById('shockCompressionClicks').textContent;
var resultsText = "Fox Suspension Calculator Results:\n\n" +
"--- Your Inputs ---\n" +
"Rider Weight: " + riderWeight + " " + weightUnit + "\n" +
"Fork Model: Fox " + forkModel + "\n" +
"Fork Travel: " + forkTravel + " mm\n" +
"Shock Model: Fox Float " + shockModel + "\n" +
"Shock Travel: " + shockTravel + " mm\n" +
"Riding Style: " + ridingStyle + "\n\n" +
"--- Recommended Settings ---\n" +
"Fork Air Pressure: " + forkAirPressurePSI + " PSI\n" +
"Fork Sag: " + forkSagMM + " mm (" + forkSagPercent + "%)\n" +
"Fork Rebound: " + forkReboundClicks + " Clicks from closed\n" +
"Fork Compression: " + forkCompressionClicks + " Clicks from closed\n" +
"Shock Air Pressure: " + shockAirPressurePSI + " PSI\n" +
"Shock Sag: " + shockSagMM + " mm (" + shockSagPercent + "%)\n" +
"Shock Rebound: " + shockReboundClicks + " Clicks from closed\n" +
"Shock Compression: " + shockCompressionClicks + " Clicks from closed\n\n" +
"Note: These are starting points. Fine-tune on the trail for optimal performance.";
navigator.clipboard.writeText(resultsText).then(function() {
alert('Results copied to clipboard!');
}).catch(function(err) {
console.error('Could not copy text: ', err);
alert('Failed to copy results. Please copy manually.');
});
}
// Initial calculation and chart draw on page load
window.onload = function() {
calculateSuspension();
};