{"id":7741,"date":"2023-09-21T15:30:33","date_gmt":"2023-09-21T19:30:33","guid":{"rendered":"http:\/\/www.germaniamutual.com\/g\/?page_id=7741"},"modified":"2023-10-05T10:54:33","modified_gmt":"2023-10-05T14:54:33","slug":"premiumcalculator","status":"publish","type":"page","link":"https:\/\/www.germaniamutual.com\/g\/premiumcalculator\/","title":{"rendered":""},"content":{"rendered":"\n<!DOCTYPE html>\n<html>\n<head>\n    <title>Premium Cancellation Calculator<\/title>\n    <script>\n        function daysBetween(startDate, endDate) {\n            const date1 = new Date(startDate);\n            const date2 = new Date(endDate);\n            const timeDifference = date2 - date1;\n            const daysDif = Math.floor(timeDifference \/ (1000 * 3600 * 24));\n            return daysDif;\n        }\n\n        function calculate() {\n            const startDate = document.getElementById('startDate').value;\n            const endDate = document.getElementById('endDate').value;\n            const premium = parseFloat(document.getElementById('premium').value);\n\n            if (!startDate || !endDate || isNaN(premium)) {\n                alert('Please enter valid input.');\n                return;\n            }\n\n            const daysDif = daysBetween(startDate, endDate);\n            const proRataPercent = (daysDif \/ 365).toFixed(4);\n            const shortRatePercent = calculateShortRate(daysDif).toFixed(4);\n\n            document.getElementById('daysInForce').textContent = daysDif;\n            document.getElementById('percentRetainedProRata').textContent =  (proRataPercent*100).toFixed(2) + ' %' ;\n            document.getElementById('percentRetainedShortRate').textContent = (shortRatePercent*100).toFixed(0) + ' %';\n            document.getElementById('amountRetainedProRata').textContent = `${(proRataPercent * premium).toFixed(0)}`;\n            document.getElementById('amountRetainedShortRate').textContent = `${(shortRatePercent * premium).toFixed(0)}`;\n            document.getElementById('amountRefundProRata').textContent = `${((1 - proRataPercent) * premium).toFixed(0)}`;\n            document.getElementById('amountRefundShortRate').textContent = `${((1 - shortRatePercent) * premium).toFixed(0)}`;\n        }\n\n        function calculateShortRate(daysDif) {\n            const daysFormula = [3,7,11,15,19,23,26,30,34,38,42,46,49,53,57,61,65,69,73,76,80,84,88,92,96,99,103,107,111,115,119,122,126,130,134,138,142,146,149,153,157,161,165,169,172,176,180,184,188,192,195,199,203,207,211,215,219,222,226,230,234,238,242,245,249,253,257,261,265,268,272,276,280,284,288,292,296,299,303,307,311,315,318,322,326,330,334,338,341,345,349,353,365];\n\n            for (let i = 0; i < daysFormula.length; i++) {\n                if (daysDif <= daysFormula[i]) {\n                    return (i + 8) \/ 100;\n                }\n            }\n\n            return 1.0; \/\/ Default value if daysDif is greater than the last value in daysFormula\n        }\n    <\/script>\n\n\n<html>\n<head>\n    <style>\n\n        \/* Remove underline from links with the class \"no-link\" *\/\n        .no-link {\n            text-decoration: none;\n        }\n\n        .arrow-button {\n            display: flex;\n            color: #6e7073;\n            background-color: #b6e2dc;\n            padding: 10px 16px;\n            border-radius: 20px;\n            transition: all .3s ease;\n            font-weight: bold;\n            cursor: pointer;\n            align-items: center;\n            font-size: 14px;\n        }\n\n        .arrow-button > .arrow {\n            width: 6px;\n            height: 6px;\n            border-right: 2px solid #6e7073;\n            border-bottom: 2px solid #6e7073;\n            position: relative;\n            transform: rotate(-45deg);\n            margin: 0 6px;\n            transition: all .3s ease;\n        }\n\n        .arrow-button > .arrow::before {\n            display: block;\n            background-color: currentColor;\n            width: 3px;\n            transform-origin: bottom right;\n            height: 2px;\n            position: absolute;\n            opacity: 0;\n            bottom: calc(-2px \/ 2);\n            transform: rotate(45deg);\n            transition: all .3s ease;\n            content: \"\";\n            right: 0;\n        }\n\n        .arrow-button:hover > .arrow {\n            transform: rotate(-45deg) translate(4px, 4px);\n            border-color: text-hover-color;\n        }\n\n        .arrow-button:hover > .arrow::before {\n            opacity: 1;\n            width: 8px;\n        }\n\n        .arrow-button:hover {\n            background-color: #54515f;\n            color: #fff;\n        }\n\n        body {\n            font-family: Arial, sans-serif;\n            text-align: center;\n            background-color: #f4f4f4;\n        }\n        \n        h1 {\n            color: #333;\n        }\n\n        .date-label {\n            display: inline-block;\n            vertical-align: top;\n            width: 170px;\n        }\n\n        .date-input input[type=\"date\"] {\n            padding: 5px;\n            border: 1px solid #ccc;\n            border-radius: 3px;\n        }\n\n        .section-container {\n            display: inline-block;\n            text-align: left;\n            vertical-align: top;\n            margin: 10px;\n            width: 160px;\n            border: 1px solid #ccc;\n            border-radius: 5px;\n            padding: 10px;\n            background-color: #fff;\n            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);\n        }\n\n        .section-container-noborder {\n            display: inline-block;\n            text-align: left;\n            vertical-align: top;\n\n        }\n\n        .section-title {\n            font-size: 1.2em;\n            font-weight: bold;\n            margin-bottom: 10px;\n            text-align: center; \/* Center the section title *\/\n        }\n\n        button {\n            padding: 10px 20px;\n            background-color: #333;\n            color: #fff;\n            border: none;\n            border-radius: 3px;\n            cursor: pointer;\n        }\n\n        .section-content {\n            text-align: center;\n        }\n\n        button:hover {\n            background-color: #555;\n        }\n\n        p {\n            margin: 10px 0;\n            font-weight: bold;\n        }\n\n        span {\n            color: #555;\n        }\n\n        #head {\n            background-color: #333;\n            color: #fff;\n            text-align: center;\n            padding: 10px 0;\n        }\n\n         \/* Style the navigation menu *\/\n        .naver {\n            display: flex;\n            justify-content: center;\n        }\n\n        .naver-list {\n            list-style-type: none;\n            display: flex;\n        }\n\n        .naver-list li {\n            margin: 0 10px;\n        }\n\n        .naver-list a {\n            text-decoration: none;\n            color: #fff;\n            font-weight: bold;\n            transition: color 0.3s;\n        }\n\n        .naver-list a:hover {\n            color: #ff4500; \/* Change to your desired hover color *\/\n        }\n\n        \/* Style the main content area *\/\n        #content {\n            margin: 20px;\n            padding: 20px;\n            border: 1px solid #ccc;\n            background-color: #f9f9f9;\n            box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);\n        }\n\n        ul {\n            margin: 0;\n            padding: 0;\n        }\n\n    <\/style>\n<\/head>\n<body>\n    <h1>Premium Cancellation Calculator<\/h1>\n        <div id = 'head'>\n        <nav class=\"naver\">\n            <ul class=\"naver-list\">\n                <li><a href=\"https:\/\/www.germaniamutual.com\/g\/premiumcalculator\/\" >Cancelation<\/a><\/li>\n                <li><a href=\"https:\/\/www.germaniamutual.com\/g\/endorsementcalculator\/\" id=\"page2-link\">Endorsement<\/a><\/li>\n                <li><a href=\"https:\/\/www.germaniamutual.com\/g\/seasonalcalculator\/\" id=\"page3-link\">Seasonal<\/a><\/li>\n            <\/ul>\n        <\/nav>\n    <\/div>\n    <br>\n    <div class=\"date-label\">\n        <label for=\"startDate\">Start Date<\/label>\n        <input type=\"date\" id=\"startDate\" value=\"2023-01-01\">\n    <\/div>\n    <div class=\"date-label\">\n        <label for=\"endDate\">End Date<\/label>\n        <input type=\"date\" id=\"endDate\" value=\"2023-01-01\">\n    <\/div>\n    <br>\n    <br>\n    <label for=\"premium\">Premium Paid<\/label>\n    <br>\n    $<input type=\"text\" id=\"premium\" value=\"0\"><br><br>\n\n    <button onclick=\"calculate()\">Calculate<\/button><br><br>\n    <p>Days In Force - <span id=\"daysInForce\">0<\/span><\/p>       \n\n    \n    <div class=\"section-container\">\n        <h2 class=\"section-title\">&nbsp; <\/h2>\n        <div class=\"section-content\">\n            <p>Percent Retained<\/p>\n            <p>Amount Retained<\/p>\n            <p>Amount Refund<\/p>\n        <\/div>\n    <\/div>\n\n    <div class=\"section-container\">\n        <h2 class=\"section-title\">Pro-Rata<\/h2>\n        <div class=\"section-content\">\n            <p><span id=\"percentRetainedProRata\">0%<\/span><\/p>\n            <p>$<span id=\"amountRetainedProRata\">0.00<\/span><\/p>\n            <p>$<span id=\"amountRefundProRata\">0.00<\/span><\/p>\n        <\/div>\n    <\/div>\n\n    <div class=\"section-container\">\n        <h2 class=\"section-title\">Short Rate<\/h2>\n        <div class=\"section-content\">\n            <p><span id=\"percentRetainedShortRate\">0%<\/span><\/p>\n            <p>$<span id=\"amountRetainedShortRate\">0.00<\/span><\/p>\n            <p>$<span id=\"amountRefundShortRate\">0.00<\/span><\/p>\n        <\/div>\n    <\/div>\n\n<\/body>\n<\/html>\n","protected":false},"excerpt":{"rendered":"<p>Premium Cancellation Calculator Premium Cancellation Calculator Cancelation Endorsement Seasonal Start Date End Date Premium Paid $ Calculate Days In Force &#8211; 0 &nbsp; Percent Retained Amount Retained Amount Refund Pro-Rata 0% $0.00 $0.00 Short Rate 0% $0.00 $0.00<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-7741","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.germaniamutual.com\/g\/wp-json\/wp\/v2\/pages\/7741","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.germaniamutual.com\/g\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.germaniamutual.com\/g\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.germaniamutual.com\/g\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.germaniamutual.com\/g\/wp-json\/wp\/v2\/comments?post=7741"}],"version-history":[{"count":3,"href":"https:\/\/www.germaniamutual.com\/g\/wp-json\/wp\/v2\/pages\/7741\/revisions"}],"predecessor-version":[{"id":7764,"href":"https:\/\/www.germaniamutual.com\/g\/wp-json\/wp\/v2\/pages\/7741\/revisions\/7764"}],"wp:attachment":[{"href":"https:\/\/www.germaniamutual.com\/g\/wp-json\/wp\/v2\/media?parent=7741"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}