Spaces:
Running
Running
File size: 61,444 Bytes
747147a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Reconstruction Project Estimator</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
.calculator-card {
transition: all 0.3s ease;
}
.calculator-card:hover {
transform: translateY(-3px);
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.tab-button {
transition: all 0.2s ease;
}
.tab-button.active {
background-color: #3b82f6;
color: white;
}
.summary-item {
border-left: 4px solid #3b82f6;
}
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
-webkit-appearance: none;
margin: 0;
}
.profit-positive {
color: #10b981;
}
.profit-negative {
color: #ef4444;
}
.profit-neutral {
color: #6b7280;
}
</style>
</head>
<body class="bg-gray-50 min-h-screen">
<header class="bg-blue-700 text-white shadow-lg">
<div class="container mx-auto px-4 py-6">
<div class="flex flex-col md:flex-row justify-between items-center">
<div class="mb-4 md:mb-0">
<h1 class="text-3xl font-bold">Reconstruction Estimator Pro</h1>
<p class="text-blue-200 mt-1">Accurate pricing based on industry standards</p>
</div>
<div class="flex items-center space-x-4">
<button id="resetBtn" class="bg-white text-blue-700 px-4 py-2 rounded-lg font-semibold hover:bg-blue-50 transition">
<i class="fas fa-redo mr-2"></i>Reset All
</button>
<button id="printBtn" class="bg-blue-800 text-white px-4 py-2 rounded-lg font-semibold hover:bg-blue-900 transition">
<i class="fas fa-print mr-2"></i>Print Estimate
</button>
</div>
</div>
</div>
</header>
<main class="container mx-auto px-4 py-8">
<div class="grid grid-cols-1 lg:grid-cols-3 gap-8">
<div class="lg:col-span-2">
<div class="bg-white rounded-xl shadow-md p-6 mb-6">
<h2 class="text-2xl font-bold text-gray-800 mb-4">Project Details</h2>
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Project Name</label>
<input type="text" id="projectName" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" placeholder="e.g., Smith Residence Kitchen">
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Project Date</label>
<input type="date" id="projectDate" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500">
</div>
</div>
<div class="mt-4">
<label class="block text-sm font-medium text-gray-700 mb-1">Project Notes</label>
<textarea id="projectNotes" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" rows="3" placeholder="Any special considerations..."></textarea>
</div>
<div class="mt-4 grid grid-cols-1 md:grid-cols-2 gap-4">
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Contract Total ($)</label>
<input type="number" id="contractTotal" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" placeholder="Total contract amount">
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Estimated Overhead (%)</label>
<input type="number" id="overheadPercent" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" value="15" placeholder="Overhead percentage">
</div>
</div>
</div>
<div class="bg-white rounded-xl shadow-md p-6 mb-6">
<div class="flex overflow-x-auto space-x-1 pb-2">
<button class="tab-button px-4 py-2 rounded-lg font-medium active" data-tab="maintrade">Main Trade</button>
<button class="tab-button px-4 py-2 rounded-lg font-medium" data-tab="countertops">Countertops</button>
<button class="tab-button px-4 py-2 rounded-lg font-medium" data-tab="flooring">Flooring</button>
<button class="tab-button px-4 py-2 rounded-lg font-medium" data-tab="tile">Tile</button>
<button class="tab-button px-4 py-2 rounded-lg font-medium" data-tab="showers">Showers</button>
<button class="tab-button px-4 py-2 rounded-lg font-medium" data-tab="cabinetry">Cabinetry</button>
</div>
<div id="tabContent" class="mt-4">
<!-- Main Trade Tab -->
<div class="tab-content" id="maintrade-tab">
<div class="calculator-card bg-gray-50 p-4 rounded-lg">
<h3 class="font-bold text-lg text-gray-800 mb-3">Main Trade Labor</h3>
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Number of Days</label>
<input type="number" id="tradeDays" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" placeholder="Estimated days">
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Daily Rate</label>
<select id="tradeRate" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500">
<option value="600">$600/day (Standard)</option>
<option value="700">$700/day (Moderate)</option>
<option value="800">$800/day (Heavy Labor)</option>
</select>
</div>
</div>
<div class="mt-3 space-y-2">
<label class="inline-flex items-center">
<input type="checkbox" id="tradeMaterials" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded">
<span class="ml-2 text-sm text-gray-700">Add Materials Surcharge (+15%)</span>
</label>
<label class="inline-flex items-center">
<input type="checkbox" id="tradeHeavy" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded">
<span class="ml-2 text-sm text-gray-700">Heavy Labor (+10%)</span>
</label>
</div>
<button onclick="calculateTrade()" class="mt-4 bg-blue-600 text-white px-4 py-2 rounded-md hover:bg-blue-700 transition">Calculate</button>
<div id="tradeResult" class="mt-3 p-3 bg-blue-50 rounded-md hidden">
<div class="flex justify-between">
<span class="font-medium">Estimated Cost:</span>
<span id="tradeCost" class="font-bold">$0.00</span>
</div>
</div>
</div>
</div>
<!-- Countertops Tab -->
<div class="tab-content hidden" id="countertops-tab">
<div class="calculator-card bg-gray-50 p-4 rounded-lg mb-4">
<h3 class="font-bold text-lg text-gray-800 mb-3">Solid/Stone Countertops</h3>
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Square Footage</label>
<input type="number" id="countertopSqft" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" placeholder="Total sqft">
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Number of Slabs</label>
<input type="number" id="countertopSlabs" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" placeholder="Slab count">
</div>
</div>
<div class="mt-3 space-y-2">
<label class="inline-flex items-center">
<input type="checkbox" id="countertopDisposal" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded">
<span class="ml-2 text-sm text-gray-700">Disposal Needed (+$170)</span>
</label>
<label class="inline-flex items-center">
<input type="checkbox" id="countertopSubdeck" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded">
<span class="ml-2 text-sm text-gray-700">Sub Deck Needed (+$200)</span>
</label>
</div>
<button onclick="calculateCountertop()" class="mt-4 bg-blue-600 text-white px-4 py-2 rounded-md hover:bg-blue-700 transition">Calculate</button>
<div id="countertopResult" class="mt-3 p-3 bg-blue-50 rounded-md hidden">
<div class="flex justify-between">
<span class="font-medium">Estimated Cost:</span>
<span id="countertopCost" class="font-bold">$0.00</span>
</div>
</div>
</div>
<div class="calculator-card bg-gray-50 p-4 rounded-lg">
<h3 class="font-bold text-lg text-gray-800 mb-3">Laminate Countertops</h3>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Linear Feet</label>
<input type="number" id="laminateLnft" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" placeholder="Total linear feet">
</div>
<button onclick="calculateLaminate()" class="mt-4 bg-blue-600 text-white px-4 py-2 rounded-md hover:bg-blue-700 transition">Calculate</button>
<div id="laminateResult" class="mt-3 p-3 bg-blue-50 rounded-md hidden">
<div class="flex justify-between">
<span class="font-medium">Estimated Cost:</span>
<span id="laminateCost" class="font-bold">$0.00</span>
</div>
</div>
</div>
</div>
<!-- Flooring Tab -->
<div class="tab-content hidden" id="flooring-tab">
<div class="calculator-card bg-gray-50 p-4 rounded-lg mb-4">
<h3 class="font-bold text-lg text-gray-800 mb-3">Vinyl/Laminate Flooring</h3>
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Square Footage</label>
<input type="number" id="vinylSqft" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" placeholder="Total sqft">
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Linear Feet (Quarter Round)</label>
<input type="number" id="vinylLnft" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" placeholder="Linear feet">
</div>
</div>
<div class="grid grid-cols-1 md:grid-cols-2 gap-4 mt-2">
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Material Cost ($/sqft)</label>
<input type="number" id="vinylMaterialCost" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" placeholder="Material cost per sqft">
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Delivery Trips</label>
<input type="number" id="vinylTrips" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" placeholder="Number of trips">
</div>
</div>
<div class="mt-3 space-y-2">
<label class="inline-flex items-center">
<input type="checkbox" id="vinylDemo" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded">
<span class="ml-2 text-sm text-gray-700">Demo Needed (+$1.50/sqft)</span>
</label>
<label class="inline-flex items-center">
<input type="checkbox" id="vinylUnderlayment" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded">
<span class="ml-2 text-sm text-gray-700">Underlayment Needed (+$0.75/sqft)</span>
</label>
<label class="inline-flex items-center">
<input type="checkbox" id="vinylLeveling" class="h-4 w-4 text-blue-600 focus:ring-blue-5 00 border-gray-300 rounded">
<span class="ml-2 text-sm text-gray-700">Floor Leveling Needed (+$1.50/sqft)</span>
</label>
</div>
<button onclick="calculateVinyl()" class="mt-4 bg-blue-600 text-white px-4 py-2 rounded-md hover:bg-blue-700 transition">Calculate</button>
<div id="vinylResult" class="mt-3 p-3 bg-blue-50 rounded-md hidden">
<div class="flex justify-between">
<span class="font-medium">Estimated Cost:</span>
<span id="vinylCost" class="font-bold">$0.00</span>
</div>
</div>
</div>
<div class="calculator-card bg-gray-50 p-4 rounded-lg mb-4">
<h3 class="font-bold text-lg text-gray-800 mb-3">Hardwood Flooring</h3>
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Square Footage</label>
<input type="number" id="woodSqft" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" placeholder="Total sqft">
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Linear Feet (Quarter Round)</label>
<input type="number" id="woodLnft" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" placeholder="Linear feet">
</div>
</div>
<div class="mt-2">
<label class="block text-sm font-medium text-gray-700 mb-1">Material Cost ($/sqft)</label>
<input type="number" id="woodMaterialCost" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" placeholder="Material cost per sqft">
</div>
<div class="mt-3 space-y-2">
<label class="inline-flex items-center">
<input type="checkbox" id="woodDemo" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded">
<span class="ml-2 text-sm text-gray-700">Demo Needed (+$2.00/sqft)</span>
</label>
<label class="inline-flex items-center">
<input type="checkbox" id="woodLeveling" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded">
<span class="ml-2 text-sm text-gray-700">Floor Leveling Needed (+$1.50/sqft)</span>
</label>
</div>
<button onclick="calculateWood()" class="mt-4 bg-blue-600 text-white px-4 py-2 rounded-md hover:bg-blue-700 transition">Calculate</button>
<div id="woodResult" class="mt-3 p-3 bg-blue-50 rounded-md hidden">
<div class="flex justify-between">
<span class="font-medium">Estimated Cost:</span>
<span id="woodCost" class="font-bold">$0.00</span>
</div>
</div>
</div>
<div class="calculator-card bg-gray-50 p-4 rounded-lg">
<h3 class="font-bold text-lg text-gray-800 mb-3">Carpet</h3>
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Square Footage</label>
<input type="number" id="carpetSqft" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" placeholder="Total sqft">
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Number of Rooms</label>
<input type="number" id="carpetRooms" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" placeholder="Number of rooms">
</div>
</div>
<div class="mt-2">
<label class="block text-sm font-medium text-gray-700 mb-1">Material Cost ($/sqft)</label>
<input type="number" id="carpetMaterialCost" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" placeholder="Material cost per sqft">
</div>
<div class="mt-3">
<label class="inline-flex items-center">
<input type="checkbox" id="carpetDemo" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded">
<span class="ml-2 text-sm text-gray-700">Demo Needed (+$1.00/sqft)</span>
</label>
</div>
<button onclick="calculateCarpet()" class="mt-4 bg-blue-600 text-white px-4 py-2 rounded-md hover:bg-blue-700 transition">Calculate</button>
<div id="carpetResult" class="mt-3 p-3 bg-blue-50 rounded-md hidden">
<div class="flex justify-between">
<span class="font-medium">Estimated Cost:</span>
<span id="carpetCost" class="font-bold">$0.00</span>
</div>
</div>
</div>
</div>
<!-- Tile Tab -->
<div class="tab-content hidden" id="tile-tab">
<div class="calculator-card bg-gray-50 p-4 rounded-lg mb-4">
<h3 class="font-bold text-lg text-gray-800 mb-3">Tile Flooring</h3>
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Square Footage</label>
<input type="number" id="tileSqft" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" placeholder="Total sqft">
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Material Cost ($/sqft)</label>
<input type="number" id="tileMaterialCost" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" placeholder="Material cost per sqft">
</div>
</div>
<div class="mt-3 space-y-2">
<label class="inline-flex items-center">
<input type="checkbox" id="tileDemo" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded">
<span class="ml-2 text-sm text-gray-700">Demo Needed (+$2.00/sqft)</span>
</label>
<label class="inline-flex items-center">
<input type="checkbox" id="tileSmallBath" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded">
<span class="ml-2 text-sm text-gray-700">Small Bathroom (+$150)</span>
</label>
</div>
<div id="tileBathLocation" class="mt-2 hidden">
<label class="block text-sm font-medium text-gray-700 mb-1">Bathroom Location</label>
<div class="flex space-x-4">
<label class="inline-flex items-center">
<input type="radio" name="bathLocation" value="main" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300">
<span class="ml-2 text-sm text-gray-700">Main Floor</span>
</label>
<label class="inline-flex items-center">
<input type="radio" name="bathLocation" value="upstairs" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300">
<span class="ml-2 text-sm text-gray-700">Upstairs</span>
</label>
</div>
</div>
<button onclick="calculateTile()" class="mt-4 bg-blue-600 text-white px-4 py-2 rounded-md hover:bg-blue-700 transition">Calculate</button>
<div id="tileResult" class="mt-3 p-3 bg-blue-50 rounded-md hidden">
<div class="flex justify-between">
<span class="font-medium">Estimated Cost:</span>
<span id="tileCost" class="font-bold">$0.00</span>
</div>
</div>
</div>
<div class="calculator-card bg-gray-50 p-4 rounded-lg">
<h3 class="font-bold text-lg text-gray-800 mb-3">Backsplash</h3>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Square Footage</label>
<input type="number" id="backsplashSqft" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" placeholder="Total sqft">
</div>
<div class="mt-2">
<label class="block text-sm font-medium text-gray-700 mb-1">Complexity</label>
<select id="backsplashComplexity" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500">
<option value="simple">Simple (Straight runs)</option>
<option value="medium">Medium (Some cuts)</option>
<option value="complex">Complex (Many cuts/patterns)</option>
</select>
</div>
<button onclick="calculateBacksplash()" class="mt-4 bg-blue-600 text-white px-4 py-2 rounded-md hover:bg-blue-700 transition">Calculate</button>
<div id="backsplashResult" class="mt-3 p-3 bg-blue-50 rounded-md hidden">
<div class="flex justify-between">
<span class="font-medium">Estimated Cost:</span>
<span id="backsplashCost" class="font-bold">$0.00</span>
</div>
</div>
</div>
</div>
<!-- Showers Tab -->
<div class="tab-content hidden" id="showers-tab">
<div class="calculator-card bg-gray-50 p-4 rounded-lg mb-4">
<h3 class="font-bold text-lg text-gray-800 mb-3">Shower Installation</h3>
<label class="block text-sm font-medium text-gray-700 mb-1">Shower Size</label>
<select id="showerSize" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500">
<option value="basic">Basic (3'x3')</option>
<option value="medium">Medium (3'x4')</option>
<option value="large">Large (4'x5')</option>
<option value="custom">Custom Size</option>
</select>
<div id="showerCustomSize" class="mt-2 hidden">
<label class="block text-sm font-medium text-gray-700 mb-1">Custom Dimensions (LxW in feet)</label>
<input type="text" id="showerDimensions" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" placeholder="e.g., 3.5x4">
</div>
<div class="mt-3 space-y-2">
<label class="inline-flex items-center">
<input type="checkbox" id="showerDualHead" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded">
<span class="ml-2 text-sm text-gray-700">Dual Shower Head (+$300)</span>
</label>
<label class="inline-flex items-center">
<input type="checkbox" id="showerBench" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded">
<span class="ml-2 text-sm text-gray-700">Shower Bench (+$450)</span>
</label>
<label class="inline-flex items-center">
<input type="checkbox" id="showerMultipleNiches" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded">
<span class="ml-2 text-sm text-gray-700">Multiple Niches (+$200)</span>
</label>
</div>
<button onclick="calculateShower()" class="mt-4 bg-blue-600 text-white px-4 py-2 rounded-md hover:bg-blue-700 transition">Calculate</button>
<div id="showerResult" class="mt-3 p-3 bg-blue-50 rounded-md hidden">
<div class="flex justify-between">
<span class="font-medium">Estimated Cost:</span>
<span id="showerCost" class="font-bold">$0.00</span>
</div>
</div>
</div>
<div class="calculator-card bg-gray-50 p-4 rounded-lg mb-4">
<h3 class="font-bold text-lg text-gray-800 mb-3">Tub Surround</h3>
<div class="space-y-2">
<label class="inline-flex items-center">
<input type="checkbox" id="tubStandard" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded">
<span class="ml-2 text-sm text-gray-700">Standard Tub Surround ($1200)</span>
</label>
</div>
<button onclick="calculateTub()" class="mt-4 bg-blue-600 text-white px-4 py-2 rounded-md hover:bg-blue-700 transition">Calculate</button>
<div id="tubResult" class="mt-3 p-3 bg-blue-50 rounded-md hidden">
<div class="flex justify-between">
<span class="font-medium">Estimated Cost:</span>
<span id="tubCost" class="font-bold">$0.00</span>
</div>
</div>
</div>
<div class="calculator-card bg-gray-50 p-4 rounded-lg">
<h3 class="font-bold text-lg text-gray-800 mb-3">Shower Glass</h3>
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Glass Type</label>
<select id="glassType" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500">
<option value="standard">Standard Framed</option>
<option value="frameless">Frameless</option>
<option value="reinstall">Reinstall Existing</option>
</select>
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Linear Feet</label>
<input type="number" id="glassLnft" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" placeholder="Linear feet">
</div>
</div>
<button onclick="calculateGlass()" class="mt-4 bg-blue-600 text-white px-4 py-2 rounded-md hover:bg-blue-700 transition">Calculate</button>
<div id="glassResult" class="mt-3 p-3 bg-blue-50 rounded-md hidden">
<div class="flex justify-between">
<span class="font-medium">Estimated Cost:</span>
<span id="glassCost" class="font-bold">$0.00</span>
</div>
</div>
</div>
</div>
<!-- Cabinetry Tab -->
<div class="tab-content hidden" id="cabinetry-tab">
<div class="calculator-card bg-gray-50 p-4 rounded-lg">
<h3 class="font-bold text-lg text-gray-800 mb-3">Cabinet Repair/Installation</h3>
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Linear Feet</label>
<input type="number" id="cabinetLnft" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" placeholder="Linear feet">
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Number of Doors</label>
<input type="number" id="cabinetDoors" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" placeholder="Number of doors">
</div>
</div>
<button onclick="calculateCabinet()" class="mt-4 bg-blue-600 text-white px-4 py-2 rounded-md hover:bg-blue-700 transition">Calculate</button>
<div id="cabinetResult" class="mt-3 p-3 bg-blue-50 rounded-md hidden">
<div class="flex justify-between">
<span class="font-medium">Estimated Cost:</span>
<span id="cabinetCost" class="font-bold">$0.00</span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="lg:col-span-1">
<div class="bg-white rounded-xl shadow-md p-6 sticky top-8">
<h2 class="text-2xl font-bold text-gray-800 mb-4">Project Summary</h2>
<div class="mb-6">
<h3 class="text-lg font-semibold text-gray-700 mb-2">Financial Overview</h3>
<div class="grid grid-cols-2 gap-4">
<div class="bg-gray-50 p-3 rounded-lg">
<p class="text-sm text-gray-500">Contract Total</p>
<p id="summaryContract" class="text-xl font-bold">$0.00</p>
</div>
<div class="bg-gray-50 p-3 rounded-lg">
<p class="text-sm text-gray-500">Estimated Costs</p>
<p id="summaryCosts" class="text-xl font-bold">$0.00</p>
</div>
<div class="bg-gray-50 p-3 rounded-lg">
<p class="text-sm text-gray-500">Overhead</p>
<p id="summaryOverhead" class="text-xl font-bold">$0.00</p>
</div>
<div class="bg-gray-50 p-3 rounded-lg">
<p class="text-sm text-gray-500">Profit</p>
<p id="summaryProfit" class="text-xl font-bold">$0.00</p>
</div>
</div>
</div>
<div class="mb-6">
<h3 class="text-lg font-semibold text-gray-700 mb-2">Cost Breakdown</h3>
<div id="costItems" class="space-y-3">
<div class="text-center text-gray-500 py-4">
<i class="fas fa-calculator text-2xl mb-2"></i>
<p>Start adding items to see your cost breakdown</p>
</div>
</div>
</div>
<div class="border-t border-gray-200 pt-4">
<div class="flex justify-between items-center mb-2">
<span class="font-semibold">Total Estimated Costs:</span>
<span id="totalCosts" class="font-bold text-lg">$0.00</span>
</div>
<button onclick="updateSummary()" class="mt-4 w-full bg-blue-600 text-white py-2 rounded-md hover:bg-blue-700 transition">
<i class="fas fa-sync-alt mr-2"></i>Update Summary
</button>
</div>
</div>
</div>
</div>
</main>
<script>
// Global variables to store calculated values
const calculatedItems = {
trade: 0,
countertop: 0,
laminate: 0,
vinyl: 0,
wood: 0,
carpet: 0,
tile: 0,
backsplash: 0,
shower: 0,
tub: 0,
glass: 0,
cabinet: 0
};
// Tab switching functionality
document.querySelectorAll('.tab-button').forEach(button => {
button.addEventListener('click', function() {
// Remove active class from all buttons
document.querySelectorAll('.tab-button').forEach(btn => {
btn.classList.remove('active');
});
// Add active class to clicked button
this.classList.add('active');
// Hide all tab contents
document.querySelectorAll('.tab-content').forEach(content => {
content.classList.add('hidden');
});
// Show the selected tab content
const tabId = this.getAttribute('data-tab') + '-tab';
document.getElementById(tabId).classList.remove('hidden');
});
});
// Calculate Trade Labor
function calculateTrade() {
const days = parseFloat(document.getElementById('tradeDays').value) || 0;
const rate = parseFloat(document.getElementById('tradeRate').value) || 0;
const materialsSurcharge = document.getElementById('tradeMaterials').checked;
const heavyLabor = document.getElementById('tradeHeavy').checked;
let cost = days * rate;
if (materialsSurcharge) cost *= 1.15;
if (heavyLabor) cost *= 1.10;
calculatedItems.trade = cost;
document.getElementById('tradeCost').textContent = `$${cost.toFixed(2)}`;
document.getElementById('tradeResult').classList.remove('hidden');
addCostItem('Main Trade Labor', cost);
updateSummary();
}
// Calculate Countertop
function calculateCountertop() {
const sqft = parseFloat(document.getElementById('countertopSqft').value) || 0;
const slabs = parseFloat(document.getElementById('countertopSlabs').value) || 0;
const disposal = document.getElementById('countertopDisposal').checked;
const subdeck = document.getElementById('countertopSubdeck').checked;
// Base rate per square foot plus per slab
let cost = (sqft * 45) + (slabs * 100);
// Add disposal if needed
if (disposal) cost += 170;
// Add subdeck if needed
if (subdeck) cost += 200;
calculatedItems.countertop = cost;
document.getElementById('countertopCost').textContent = `$${cost.toFixed(2)}`;
document.getElementById('countertopResult').classList.remove('hidden');
addCostItem('Solid Countertops', cost);
updateSummary();
}
// Calculate Laminate
function calculateLaminate() {
const lnft = parseFloat(document.getElementById('laminateLnft').value) || 0;
// Base rate per linear foot
const cost = lnft * 35;
calculatedItems.laminate = cost;
document.getElementById('laminateCost').textContent = `$${cost.toFixed(2)}`;
document.getElementById('laminateResult').classList.remove('hidden');
addCostItem('Laminate Countertops', cost);
updateSummary();
}
// Calculate Vinyl Flooring
function calculateVinyl() {
const sqft = parseFloat(document.getElementById('vinylSqft').value) || 0;
const lnft = parseFloat(document.getElementById('vinylLnft').value) || 0;
const materialCost = parseFloat(document.getElementById('vinylMaterialCost').value) || 0;
const trips = parseFloat(document.getElementById('vinylTrips').value) || 0;
const demo = document.getElementById('vinylDemo').checked;
const underlayment = document.getElementById('vinylUnderlayment').checked;
const leveling = document.getElementById('vinylLeveling').checked;
// Base installation cost
let cost = sqft * 2.50;
// Add material cost
cost += sqft * materialCost;
// Add quarter round
cost += lnft * 2.50;
// Add delivery trips
cost += trips * 75;
// Add demo if needed
if (demo) cost += sqft * 1.50;
// Add underlayment if needed
if (underlayment) cost += sqft * 0.75;
// Add leveling if needed
if (leveling) cost += sqft * 1.50;
calculatedItems.vinyl = cost;
document.getElementById('vinylCost').textContent = `$${cost.toFixed(2)}`;
document.getElementById('vinylResult').classList.remove('hidden');
addCostItem('Vinyl Flooring', cost);
updateSummary();
}
// Calculate Wood Flooring
function calculateWood() {
const sqft = parseFloat(document.getElementById('woodSqft').value) || 0;
const lnft = parseFloat(document.getElementById('woodLnft').value) || 0;
const materialCost = parseFloat(document.getElementById('woodMaterialCost').value) || 0;
const demo = document.getElementById('woodDemo').checked;
const leveling = document.getElementById('woodLeveling').checked;
// Base installation cost
let cost = sqft * 3.50;
// Add material cost
cost += sqft * materialCost;
// Add quarter round
cost += lnft * 3.00;
// Add demo if needed
if (demo) cost += sqft * 2.00;
// Add leveling if needed
if (leveling) cost += sqft * 1.50;
calculatedItems.wood = cost;
document.getElementById('woodCost').textContent = `$${cost.toFixed(2)}`;
document.getElementById('woodResult').classList.remove('hidden');
addCostItem('Wood Flooring', cost);
updateSummary();
}
// Calculate Carpet
function calculateCarpet() {
const sqft = parseFloat(document.getElementById('carpetSqft').value) || 0;
const rooms = parseFloat(document.getElementById('carpetRooms').value) || 0;
const materialCost = parseFloat(document.getElementById('carpetMaterialCost').value) || 0;
const demo = document.getElementById('carpetDemo').checked;
// Base installation cost
let cost = sqft * 1.75;
// Add material cost
cost += sqft * materialCost;
// Add per room charge
cost += rooms * 50;
// Add demo if needed
if (demo) cost += sqft * 1.00;
calculatedItems.carpet = cost;
document.getElementById('carpetCost').textContent = `$${cost.toFixed(2)}`;
document.getElementById('carpetResult').classList.remove('hidden');
addCostItem('Carpet', cost);
updateSummary();
}
// Calculate Tile
function calculateTile() {
const sqft = parseFloat(document.getElementById('tileSqft').value) || 0;
const materialCost = parseFloat(document.getElementById('tileMaterialCost').value) || 0;
const demo = document.getElementById('tileDemo').checked;
const smallBath = document.getElementById('tileSmallBath').checked;
const bathLocation = document.querySelector('input[name="bathLocation"]:checked')?.value;
// Base installation cost
let cost = sqft * 5.00;
// Add material cost
cost += sqft * materialCost;
// Add demo if needed
if (demo) cost += sqft * 2.00;
// Small bathroom premium
if (smallBath) {
cost += 150;
if (bathLocation === 'upstairs') cost += 100;
}
calculatedItems.tile = cost;
document.getElementById('tileCost').textContent = `$${cost.toFixed(2)}`;
document.getElementById('tileResult').classList.remove('hidden');
addCostItem('Tile Flooring', cost);
updateSummary();
}
// Calculate Backsplash
function calculateBacksplash() {
const sqft = parseFloat(document.getElementById('backsplashSqft').value) || 0;
const complexity = document.getElementById('backsplashComplexity').value;
// Base rates based on complexity
let rate;
switch(complexity) {
case 'simple': rate = 8.00; break;
case 'medium': rate = 10.00; break;
case 'complex': rate = 15.00; break;
default: rate = 8.00;
}
const cost = sqft * rate;
calculatedItems.backsplash = cost;
document.getElementById('backsplashCost').textContent = `$${cost.toFixed(2)}`;
document.getElementById('backsplashResult').classList.remove('hidden');
addCostItem('Backsplash', cost);
updateSummary();
}
// Calculate Shower
function calculateShower() {
const size = document.getElementById('showerSize').value;
const dualHead = document.getElementById('showerDualHead').checked;
const bench = document.getElementById('showerBench').checked;
const niches = document.getElementById('showerMultipleNiches').checked;
// Base rates based on size
let cost;
switch(size) {
case 'basic': cost = 2500; break;
case 'medium': cost = 3500; break;
case 'large': cost = 4500; break;
case 'custom':
const dimensions = document.getElementById('showerDimensions').value;
if (dimensions) {
const [length, width] = dimensions.split('x').map(Number);
const area = length * width;
cost = area * 100;
} else {
cost = 3000;
}
break;
default: cost = 2500;
}
// Add features
if (dualHead) cost += 300;
if (bench) cost += 450;
if (niches) cost += 200;
calculatedItems.shower = cost;
document.getElementById('showerCost').textContent = `$${cost.toFixed(2)}`;
document.getElementById('showerResult').classList.remove('hidden');
addCostItem('Shower Installation', cost);
updateSummary();
}
// Calculate Tub
function calculateTub() {
const standard = document.getElementById('tubStandard').checked;
// Base rate
const cost = standard ? 1200 : 0;
calculatedItems.tub = cost;
document.getElementById('tubCost').textContent = `$${cost.toFixed(2)}`;
document.getElementById('tubResult').classList.remove('hidden');
addCostItem('Tub Surround', cost);
updateSummary();
}
// Calculate Glass
function calculateGlass() {
const type = document.getElementById('glassType').value;
const lnft = parseFloat(document.getElementById('glassLnft').value) || 0;
// Rates based on type
let rate;
switch(type) {
case 'standard': rate = 75; break;
case 'frameless': rate = 125; break;
case 'reinstall': rate = 40; break;
default: rate = 75;
}
const cost = lnft * rate;
calculatedItems.glass = cost;
document.getElementById('glassCost').textContent = `$${cost.toFixed(2)}`;
document.getElementById('glassResult').classList.remove('hidden');
addCostItem('Shower Glass', cost);
updateSummary();
}
// Calculate Cabinet
function calculateCabinet() {
const lnft = parseFloat(document.getElementById('cabinetLnft').value) || 0;
const doors = parseFloat(document.getElementById('cabinetDoors').value) || 0;
// Base rate per linear foot plus per door
const cost = (lnft * 25) + (doors * 50);
calculatedItems.cabinet = cost;
document.getElementById('cabinetCost').textContent = `$${cost.toFixed(2)}`;
document.getElementById('cabinetResult').classList.remove('hidden');
addCostItem('Cabinet Repair', cost);
updateSummary();
}
// Add cost item to summary
function addCostItem(name, cost) {
const costItems = document.getElementById('costItems');
// Check if item already exists
const existingItem = Array.from(costItems.children).find(item => {
return item.querySelector('.item-name')?.textContent === name;
});
if (existingItem) {
// Update existing item
existingItem.querySelector('.item-cost').textContent = `$${cost.toFixed(2)}`;
} else {
// Create new item
const item = document.createElement('div');
item.className = 'summary-item pl-3 py-2';
item.innerHTML = `
<div class="flex justify-between items-center">
<span class="item-name text-gray-700">${name}</span>
<span class="item-cost font-bold">$${cost.toFixed(2)}</span>
</div>
`;
costItems.appendChild(item);
}
// Remove placeholder if present
const placeholder = costItems.querySelector('.text-center');
if (placeholder) {
costItems.removeChild(placeholder);
}
}
// Update summary calculations
function updateSummary() {
// Calculate total costs
let totalCosts = 0;
for (const key in calculatedItems) {
totalCosts += calculatedItems[key];
}
// Get contract total and overhead
const contractTotal = parseFloat(document.getElementById('contractTotal').value) || 0;
const overheadPercent = parseFloat(document.getElementById('overheadPercent').value) || 0;
const overheadAmount = contractTotal * (overheadPercent / 100);
// Calculate profit
const profit = contractTotal - totalCosts - overheadAmount;
// Update summary display
document.getElementById('summaryContract').textContent = `$${contractTotal.toFixed(2)}`;
document.getElementById('summaryCosts').textContent = `$${totalCosts.toFixed(2)}`;
document.getElementById('summaryOverhead').textContent = `$${overheadAmount.toFixed(2)}`;
// Style profit based on value
const profitElement = document.getElementById('summaryProfit');
profitElement.textContent = `$${profit.toFixed(2)}`;
profitElement.className = 'text-xl font-bold ' +
(profit > 0 ? 'profit-positive' :
profit < 0 ? 'profit-negative' : 'profit-neutral');
document.getElementById('totalCosts').textContent = `$${totalCosts.toFixed(2)}`;
}
// Reset all fields
document.getElementById('resetBtn').addEventListener('click', function() {
// Reset all input fields
document.querySelectorAll('input[type="text"], input[type="number"], input[type="date"], textarea').forEach(input => {
input.value = '';
});
// Reset checkboxes and radios
document.querySelectorAll('input[type="checkbox"], input[type="radio"]').forEach(input => {
input.checked = false;
});
// Reset selects
document.querySelectorAll('select').forEach(select => {
select.selectedIndex = 0;
});
// Reset calculated items
for (const key in calculatedItems) {
calculatedItems[key] = 0;
}
// Reset results displays
document.querySelectorAll('[id$="Result"]').forEach(result => {
result.classList.add('hidden');
});
// Reset summary
document.getElementById('costItems').innerHTML = `
<div class="text-center text-gray-500 py-4">
<i class="fas fa-calculator text-2xl mb-2"></i>
<p>Start adding items to see your cost breakdown</p>
</div>
`;
// Reset summary numbers
updateSummary();
});
// Print functionality
document.getElementById('printBtn').addEventListener('click', function() {
window.print();
});
// Show/hide custom shower size field
document.getElementById('showerSize').addEventListener('change', function() {
const customSizeField = document.getElementById('showerCustomSize');
if (this.value === 'custom') {
customSizeField.classList.remove('hidden');
} else {
customSizeField.classList.add('hidden');
}
});
// Show/hide bathroom location options
document.getElementById('tileSmallBath').addEventListener('change', function() {
const bathLocationField = document.getElementById('tileBathLocation');
if (this.checked) {
bathLocationField.classList.remove('hidden');
} else {
bathLocationField.classList.add('hidden');
}
});
// Initialize with today's date
document.addEventListener('DOMContentLoaded', function() {
const today = new Date().toISOString().split('T')[0];
document.getElementById('projectDate').value = today;
});
</script>
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=rdowns/estimator-pro" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html> |