{"id":147,"date":"2025-06-26T18:12:27","date_gmt":"2025-06-26T18:12:27","guid":{"rendered":"https:\/\/medabre.com\/?page_id=147"},"modified":"2026-10-07T07:55:48","modified_gmt":"2026-10-07T07:55:48","slug":"calculator","status":"publish","type":"page","link":"https:\/\/medabre.com\/?page_id=147","title":{"rendered":"Check your rent affordability!"},"content":{"rendered":"\n<div style=\"height:44px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div style=\"max-width: 400px; padding: 20px; border: 1px solid #ccc; border-radius: 10px; font-family: Arial;\">\n  <h3>\ud83c\udfe0 Rent Affordability Calculator<\/h3>\n  <p>Enter your monthly income to see the recommended maximum rent you can afford per month.<\/p>\n\n  <label for=\"income\">Monthly Income (GHC):<\/label><br>\n  <input type=\"number\" id=\"income\" placeholder=\"e.g. 3000\" style=\"width: 100%; padding: 8px; margin-top: 5px;\"><br><br>\n\n  <button onclick=\"calculateRent()\" style=\"padding: 10px 15px; background-color: #0f172a; color: white; border: none; border-radius: 5px;\">Calculate<\/button>\n\n  <p id=\"result\" style=\"margin-top: 20px; font-weight: bold;\"><\/p>\n<\/div>\n\n<script>\nfunction calculateRent() {\n  const income = parseFloat(document.getElementById('income').value);\n  const result = document.getElementById('result');\n  \n  if (isNaN(income) || income <= 0) {\n    result.textContent = \"Please enter a valid income.\";\n    result.style.color = \"red\";\n    return;\n  }\n\n  const maxRent = (income * 0.3).toFixed(2);\n  result.textContent = `\u2705 Based on your income, your ideal maximum rent cost per month should be: GHC ${maxRent}`;\n  result.style.color = \"green\";\n}\n<\/script>\n\n\n\n<p class=\"has-mdm-large-font-size wp-block-paragraph\"><strong>We recommend keeping your rent below one-third of your income to stay financially comfortable.<\/strong><\/p>\n\n\n\n<p class=\"has-large-font-size wp-block-paragraph\"><\/p>\n\n\n\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\"><\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\ud83c\udfe0 Rent Affordability Calculator Enter your monthly income to see the recommended maximum rent you can afford per month. Monthly Income (GHC): Calculate We recommend keeping your rent below one-third of your income to stay financially comfortable.<\/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-147","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/medabre.com\/index.php?rest_route=\/wp\/v2\/pages\/147","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/medabre.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/medabre.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/medabre.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/medabre.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=147"}],"version-history":[{"count":31,"href":"https:\/\/medabre.com\/index.php?rest_route=\/wp\/v2\/pages\/147\/revisions"}],"predecessor-version":[{"id":474,"href":"https:\/\/medabre.com\/index.php?rest_route=\/wp\/v2\/pages\/147\/revisions\/474"}],"wp:attachment":[{"href":"https:\/\/medabre.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=147"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}