Restaurant Tipout Calculator - Calculate Server Tip Sharing
Support Staff Tipout Configuration
| Role | Tipout % | Amount | # of Staff | Per Person |
|---|
Share Your Results
`;
printWindow.document.write(printContent);
printWindow.document.close();
printWindow.print();
}function exportPDF() {
// Simplified PDF export using print to PDF
alert('PDF export feature coming soon! Use the Print button and select "Save as PDF" instead.');
}function saveCalculation() {
if (!calculationResult) return;
const savedCalculations = JSON.parse(localStorage.getItem('tipoutCalculations') || '[]');
const calculation = {
id: Date.now(),
date: new Date().toISOString(),
...calculationResult,
roles: [...currentRoles],
scheme: document.getElementById('tipoutScheme').value
};
savedCalculations.unshift(calculation);
// Keep only last 10 calculations
if (savedCalculations.length > 10) {
savedCalculations.pop();
}
localStorage.setItem('tipoutCalculations', JSON.stringify(savedCalculations));
// Show success message
const btn = document.querySelector('.add-role-btn');
const originalText = btn.innerHTML;
btn.innerHTML = 'â Saved Successfully!';
btn.style.background = '#10b981';
setTimeout(() => {
btn.innerHTML = originalText;
btn.style.background = 'linear-gradient(135deg, #0ea5e9 0%, #3b82f6 100%)';
}, 2000);
}function loadSavedCalculations() {
const savedCalculations = JSON.parse(localStorage.getItem('tipoutCalculations') || '[]');
console.log('Loaded saved calculations:', savedCalculations.length);
}function resetCalculator() {
if (confirm('Reset all inputs to default values?')) {
document.getElementById('totalTips').value = '';
document.getElementById('tipoutScheme').value = 'percentage';
document.getElementById('totalTipsError').classList.add('hidden');
document.getElementById('resultsSection').classList.add('hidden');
// Reset to default roles
currentRoles = [...defaultRoles];
initializeRoles();
// Clear URL parameters
window.history.replaceState({}, document.title, window.location.pathname);
}
}function updateURLWithCalculation() {
if (!calculationResult) return;
const params = new URLSearchParams({
total: calculationResult.totalTips,
scheme: document.getElementById('tipoutScheme').value
});
currentRoles.forEach((role, index) => {
params.set(`role_${index}`, JSON.stringify(role));
});
const newUrl = `${window.location.pathname}?${params.toString()}`;
window.history.replaceState({}, '', newUrl);
}function shareOn(platform) {
if (!calculationResult) {
alert('Please calculate your tipout first before sharing.');
return;
}
const text = `My restaurant tipout calculation:\nTotal Tips: $${calculationResult.totalTips.toFixed(2)}\nTake-Home: $${calculationResult.takeHome.toFixed(2)}\nTipout: ${calculationResult.tipoutPercent.toFixed(1)}%\nStaff: ${calculationResult.totalStaff} members`;
const url = window.location.href;
switch(platform) {
case 'facebook':
window.open(`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(url)}`, '_blank');
break;
case 'x':
window.open(`https://x.com/intent/tweet?text=${encodeURIComponent(text + '\n' + url)}`, '_blank');
break;
case 'whatsapp':
window.open(`https://wa.me/?text=${encodeURIComponent(text + '\n' + url)}`, '_blank');
break;
case 'telegram':
window.open(`https://t.me/share/url?url=${encodeURIComponent(url)}&text=${encodeURIComponent(text)}`, '_blank');
break;
case 'reddit':
window.open(`https://reddit.com/submit?url=${encodeURIComponent(url)}&title=${encodeURIComponent('Restaurant Tipout Calculation')}`, '_blank');
break;
case 'pinterest':
window.open(`https://pinterest.com/pin/create/button/?url=${encodeURIComponent(url)}&description=${encodeURIComponent(text)}`, '_blank');
break;
case 'linkedin':
window.open(`https://www.linkedin.com/sharing/share-offsite/?url=${encodeURIComponent(url)}`, '_blank');
break;
case 'tiktok':
alert('TikTok sharing not available. Copy your results to share manually!');
break;
case 'vk':
window.open(`https://vk.com/share.php?url=${encodeURIComponent(url)}&title=${encodeURIComponent('Restaurant Tipout Calculator')}`, '_blank');
break;
case 'email':
window.location.href = `mailto:?subject=Restaurant Tipout Calculation&body=${encodeURIComponent(text + '\n\n' + url)}`;
break;
}
}// Load from URL parameters
window.addEventListener('load', function() {
const params = new URLSearchParams(window.location.search);
const total = params.get('total');
if (total) {
document.getElementById('totalTips').value = total;
const scheme = params.get('scheme') || 'percentage';
document.getElementById('tipoutScheme').value = scheme;
// Load roles if present
let index = 0;
currentRoles = [];
while (params.has(`role_${index}`)) {
try {
const role = JSON.parse(params.get(`role_${index}`));
currentRoles.push(role);
} catch (e) {
console.error('Error parsing role from URL:', e);
}
index++;
}
if (currentRoles.length > 0) {
initializeRoles();
}
// Auto-calculate
setTimeout(() => calculateTipout(), 500);
}
});// JSON-LD Structured Data
const structuredData = {
"@context": "https://schema.org",
"@type": "SoftwareApplication",
"name": "Restaurant Tipout Calculator",
"description": "Professional restaurant tipout calculator for servers to calculate tip sharing with support staff",
"applicationCategory": "BusinessApplication",
"operatingSystem": "Any",
"offers": {
"@type": "Offer",
"price": "0",
"priceCurrency": "USD"
},
"featureList": [
"Real-time tipout calculation",
"Custom role configuration",
"Preset tipout schemes",
"Visual breakdown charts",
"PDF export",
"Save calculations"
],
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": "4.9",
"reviewCount": "127"
}
};const script = document.createElement('script');
script.type = 'application/ld+json';
script.text = JSON.stringify(structuredData);
document.head.appendChild(script);// FAQ Schema
const faqSchema = {
"@context": "https://schema.org",
"@type": "FAQPage",
"mainEntity": [
{
"@type": "Question",
"name": "How do I calculate my restaurant tipout?",
"acceptedAnswer": {
"@type": "Answer",
"text": "Enter your total tips earned, configure tipout percentages for each support staff role (bartenders, bussers, hosts, etc.), and our calculator will instantly show your take-home pay and detailed breakdown."
}
},
{
"@type": "Question",
"name": "What is a standard restaurant tipout percentage?",
"acceptedAnswer": {
"@type": "Answer",
"text": "Standard tipout percentages typically range from 15-25% of total tips. Bartenders often receive 5-8%, bussers 2-4%, hosts 1-3%, and food runners 2-3%, varying by restaurant type."
}
},
{
"@type": "Question",
"name": "Can I add custom roles to the tipout calculator?",
"acceptedAnswer": {
"@type": "Answer",
"text": "Yes! You can add any custom role such as Barback, Sommelier, or Expeditor with flexible tipout percentages and staff counts."
}
},
{
"@type": "Question",
"name": "Is this tipout calculator free to use?",
"acceptedAnswer": {
"@type": "Answer",
"text": "Completely free! This professional-grade restaurant tipout calculator is available for all servers and restaurant staff to use without registration or fees."
}
}
]
};const faqScript = document.createElement('script');
faqScript.type = 'application/ld+json';
faqScript.text = JSON.stringify(faqSchema);
document.head.appendChild(faqScript);