Business Calculators & Tools | Bussinology

Bussinology

Business Calculators & Tools

Free business calculators and tools to help you make informed decisions, estimate costs, and plan your projects with precision. All tools are completely free to use.

7 Calculators
7 Categories
100% Free Tools

All Calculators & Tools

`; document.getElementById('clearFilters').addEventListener('click', () => { document.getElementById('searchInput').value = ''; renderCalculators(calculators); updateFilterTags(); }); return; } grid.innerHTML = calculatorsToRender.map(calc => `
${calc.category}

${calc.icon} ${calc.title}

${calc.description}

`).join(''); // Update stats document.getElementById('totalCalculators').textContent = calculatorsToRender.length; } function updateFilterTags() { const filterTagsContainer = document.getElementById('filterTags'); // Get all unique categories const categories = [...new Set(calculators.map(calc => calc.category))]; // Add "All" tag first const tagsHtml = `
All Tools
${categories.map(category => `
${category}
`).join('')} `; filterTagsContainer.innerHTML = tagsHtml; // Update categories count document.getElementById('categoriesCount').textContent = categories.length; // Add event listeners to filter tags filterTagsContainer.querySelectorAll('.filter-tag').forEach(tag => { tag.addEventListener('click', () => { // Remove active class from all tags filterTagsContainer.querySelectorAll('.filter-tag').forEach(t => { t.classList.remove('active'); }); // Add active class to clicked tag tag.classList.add('active'); const filterValue = tag.getAttribute('data-filter'); filterCalculators(filterValue); }); }); } function filterCalculators(filterValue) { const searchTerm = document.getElementById('searchInput').value.toLowerCase(); let filteredCalculators; if (filterValue === 'all') { filteredCalculators = calculators; } else { filteredCalculators = calculators.filter(calc => calc.category === filterValue); } // Apply search filter if there's a search term if (searchTerm) { filteredCalculators = filteredCalculators.filter(calc => calc.title.toLowerCase().includes(searchTerm) || calc.description.toLowerCase().includes(searchTerm) || calc.tags.some(tag => tag.toLowerCase().includes(searchTerm)) ); } renderCalculators(filteredCalculators); } function searchCalculators() { const searchTerm = document.getElementById('searchInput').value.toLowerCase(); const activeFilter = document.querySelector('.filter-tag.active')?.getAttribute('data-filter') || 'all'; let filteredCalculators; if (activeFilter === 'all') { filteredCalculators = calculators; } else { filteredCalculators = calculators.filter(calc => calc.category === activeFilter); } if (searchTerm) { filteredCalculators = filteredCalculators.filter(calc => calc.title.toLowerCase().includes(searchTerm) || calc.description.toLowerCase().includes(searchTerm) || calc.tags.some(tag => tag.toLowerCase().includes(searchTerm)) ); } renderCalculators(filteredCalculators); } // ============================================ // INITIALIZE THE PAGE // ============================================ document.addEventListener('DOMContentLoaded', () => { // Initial render renderCalculators(); updateFilterTags(); // Search functionality document.getElementById('searchInput').addEventListener('input', searchCalculators); document.getElementById('searchBtn').addEventListener('click', searchCalculators); // Allow Enter key to trigger search document.getElementById('searchInput').addEventListener('keypress', (e) => { if (e.key === 'Enter') { searchCalculators(); } }); // Auto-update stats document.getElementById('totalCalculators').textContent = calculators.length; // Log to console for easy debugging console.log(`Bussinology Calculators Page Loaded`); console.log(`Total Calculators: ${calculators.length}`); console.log('Grid order: Break-Even (1), Dent Repair (2), Pressure Washing (3), Watts to HP (4), MB to GB (5), SaaS Pricing (6), Blog Income (7), Tree Removal (8)'); console.log('To add a new calculator, edit the "calculators" array in the JavaScript section.'); }); // ============================================ // EXPORT FUNCTION FOR ADDING NEW CALCULATORS // ============================================ window.addNewCalculator = function(newCalculator) { const requiredFields = ['title', 'description', 'category', 'url']; for (const field of requiredFields) { if (!newCalculator[field]) { console.error(`Error: New calculator is missing required field: ${field}`); return false; } } if (!newCalculator.id) { newCalculator.id = calculators.length + 1; } newCalculator.icon = newCalculator.icon || '🔧'; newCalculator.featured = newCalculator.featured || false; newCalculator.tags = newCalculator.tags || []; calculators.push(newCalculator); renderCalculators(); updateFilterTags(); console.log(`✅ Added new calculator: ${newCalculator.title}`); return true; };