Embroidery Pricing Calculator
Info
Created On: September 30, 2023
Created By:
Tags
AI
Model: chatgpt-plugin
Time: 0 seconds
Prompt Tokens: 0
Completion Tokens: 0
Total Token Cost: 0
Get This App On Your Website
Copy Code
1. Copy the code above with the iframe and link.
2. Paste the code into your website.
3. Resize the iframe to fit your website.
Javascript, HTML, CSS Code
Copy
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript"> window.addEventListener('error', function(event) { var message = JSON.parse(JSON.stringify(event.message)); var source = event.filename; var lineno = event.lineno; var colno = event.colno; var error = event.error; window.parent.postMessage({ type: 'iframeError', details: { message: message, source: source, lineno: lineno, colno: colno, error: error ? error.stack : '' } }, '*'); }); window.addEventListener('unhandledrejection', function(event) { window.parent.postMessage({ type: 'iframePromiseRejection', details: { reason: event.reason } }, '*'); }); </script>
<title>Embroidery Pricing Calculator</title>
<meta description="Embroidery Pricing Calculator for Patch22 LLC">
<meta keywords="Embroidery, Pricing, Calculator, Patch22">
<script>
function calculatePrice() {
// Thread
const spoolLengthYd = parseFloat(document.getElementById('spoolLengthYd').value);
const spoolCost = parseFloat(document.getElementById('spoolCost').value);
const designStitches = parseFloat(document.getElementById('designStitches').value);
const threadLengthUsedFt = parseFloat(document.getElementById('threadLengthUsedFt').value);
// Calculate cost per stitch
const avgStitches = 8548;
const avgThreadUsedFt = 170.29;
const costPerStitch = spoolCost / (spoolLengthYd * 3 * avgStitches / avgThreadUsedFt);
// Fabric
const fabricCostPerDesign = parseFloat(document.getElementById('fabricCostPerDesign').value);
// Stabilizer
const stabilizerCostPerDesign = parseFloat(document.getElementById('stabilizerCostPerDesign').value);
// Velcro
const velcroCostPerPatch = parseFloat(document.getElementById('velcroCostPerPatch').value);
// Packaging
const packagingCosts = parseFloat(document.getElementById('packagingCosts').value);
// Bobbin
const bobbinLengthUsed = parseFloat(document.getElementById('bobbinLengthUsed').value);
// Taxes and Shipping
const shipping = parseFloat(document.getElementById('shipping').value);
const cityTax = parseFloat(document.getElementById('cityTax').value);
const stateTax = parseFloat(document.getElementById('stateTax').value);
// Calculate
const pricePerPatch = (costPerStitch * designStitches) + fabricCostPerDesign + stabilizerCostPerDesign + velcroCostPerPatch + packagingCosts + shipping + cityTax + stateTax + (threadLengthUsedFt * costPerStitch) + (bobbinLengthUsed * costPerStitch);
// Display
document.getElementById('result').innerHTML = 'Price per Patch: $' + pricePerPatch.toFixed(2) + '<br>Cost per Stitch: $' + costPerStitch.toFixed(6);
}
</script>
<link rel="canonical" href="https://calculator.tools/prompt/7295/">
<meta charset="utf-8">
</head>
<body>
<h1>Embroidery Pricing Calculator</h1>
<form>
<label for="spoolLengthYd">Spool Length (in yards):</label>
<input type="number" id="spoolLengthYd" placeholder="5500"><br>
<label for="spoolCost">Cost of Spool:</label>
<input type="number" id="spoolCost" placeholder="9.99"><br>
<label for="designStitches">Design Stitches:</label>
<input type="number" id="designStitches" placeholder="18922"><br>
<label for="threadLengthUsedFt">Thread Length Used (in feet):</label>
<input type="number" id="threadLengthUsedFt" placeholder="0"><br>
<label for="fabricCostPerDesign">Fabric Cost per Design:</label>
<input type="number" id="fabricCostPerDesign" placeholder="0.114"><br>
<label for="stabilizerCostPerDesign">Stabilizer Cost per Design:</label>
<input type="number" id="stabilizerCostPerDesign" placeholder="1"><br>
<label for="velcroCostPerPatch">Velcro Cost per Patch:</label>
<input type="number" id="velcroCostPerPatch" placeholder="0.07"><br>
<label for="packagingCosts">Packaging Costs:</label>
<input type="number" id="packagingCosts" placeholder="0.7"><br>
<label for="bobbinLengthUsed">Bobbin Length Used (in yards):</label>
<input type="number" id="bobbinLengthUsed" placeholder="0"><br>
<label for="shipping">Shipping:</label>
<input type="number" id="shipping" placeholder="9.43"><br>
<label for="cityTax">City Tax:</label>
<input type="number" id="cityTax" placeholder="1.2"><br>
<label for="stateTax">State Tax:</label>
<input type="number" id="stateTax" placeholder="2.7"><br>
<input type="button" value="Calculate" onclick="calculatePrice()">
</form>
<h2 id="result"></h2>
<script type="text/javascript"> var localStoragePrefix = "ct-{{ cachebreaker }}"; var lastSave = 0; function saveLocal(data) { if (Date.now() - lastSave < 1000) { return; } let cookie = localStoragePrefix + "=" + JSON.stringify(data) + "; path=" + window.location.pathname + "'; SameSite=Strict"; cookie += "; expires=" + new Date(Date.now() + 1000 * 60 * 60 * 24 * 365 * 1000).toUTCString(); document.cookie = cookie; lastSave = Date.now(); } function loadLocal() { var cookiePrefix = localStoragePrefix + "="; var cookieStart = document.cookie.indexOf(cookiePrefix); if (cookieStart > -1) { let cookieEnd = document.cookie.indexOf(";", cookieStart); if (cookieEnd == -1) { cookieEnd = document.cookie.length; } var cookieData = document.cookie.substring(cookieStart + cookiePrefix.length, cookieEnd); return JSON.parse(cookieData); } } </script>
<script type="text/javascript"> window.addEventListener('load', function() { var observer = new MutationObserver(function() { window.parent.postMessage({height: document.documentElement.scrollHeight || document.body.scrollHeight},"*"); }); observer.observe(document.body, {attributes: true, childList: true, subtree: true}); window.parent.postMessage({height: document.documentElement.scrollHeight || document.body.scrollHeight},"*"); }); </script>
</body>
</html>