Power-to-Weight Ratio Calculator
Calculate the power-to-weight ratio of any vehicle or machine from power and weight
Power-to-Weight Ratio Result
Power-to-weight ratio
— hp/lb
—
—
—
🏁—
Performance classes — what this ratio means
| Ratio range (hp/lb) | Class | Typical examples |
|---|
Reference — common vehicles and machines
| Vehicle | Power | Weight | Ratio (hp/lb) | Class |
|---|
Embed this calculator
Embed code
Live preview — identical to the main calculator
EXACT MATCH
\n';
}function generateEmbedCode() {
var toolHtml = buildToolHtml();
if (embedCodeTextarea) embedCodeTextarea.value = toolHtml;
if (embedPreview) embedPreview.srcdoc = toolHtml;
}window.toggleEmbedPanel = function () {
if (!embedPanel) return;
var isHidden = (embedPanel.style.display === 'none' || embedPanel.style.display === '');
if (isHidden) {
generateEmbedCode();
embedPanel.style.display = 'block';
try { embedPanel.scrollIntoView({ behavior:'smooth', block:'start' }); } catch (e) {}
} else { embedPanel.style.display = 'none'; }
};window.closeEmbed = function () { if (embedPanel) embedPanel.style.display = 'none'; };
window.refreshEmbed = function () { generateEmbedCode(); };window.copyEmbedCode = function () {
if (!embedCodeTextarea) return;
generateEmbedCode();
embedCodeTextarea.select();
embedCodeTextarea.setSelectionRange(0, embedCodeTextarea.value.length);
if (navigator.clipboard) {
navigator.clipboard.writeText(embedCodeTextarea.value).then(function () { alert('Embed code copied!'); })
.catch(function () {
try { document.execCommand('copy'); alert('Embed code copied!'); }
catch (e) { alert('Press Ctrl+C to copy'); }
});
} else {
try { document.execCommand('copy'); alert('Embed code copied!'); }
catch (e) { alert('Press Ctrl+C to copy'); }
}
};function bindAll() {
[powerInput, weightInput].forEach(function (el) {
if (el) {
el.addEventListener('input', calculate);
el.addEventListener('change', calculate);
}
});
[powerUnitSelect, weightUnitSelect].forEach(function (el) {
if (el) el.addEventListener('change', calculate);
});
if (presetSelect) presetSelect.addEventListener('change', onPresetChange);
}function init() {
populatePresets();
bindAll();
calculate();
if (embedPanel) embedPanel.style.display = 'none';
}if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', init);
} else {
init();
}
})();