{"id":1856,"date":"2025-01-10T04:00:41","date_gmt":"2025-01-10T04:00:41","guid":{"rendered":"https:\/\/www.hashmicro.com\/my\/blog\/?p=1856"},"modified":"2025-12-19T02:55:29","modified_gmt":"2025-12-19T02:55:29","slug":"opportunity-cost","status":"publish","type":"post","link":"https:\/\/www.hashmicro.com\/my\/blog\/opportunity-cost\/","title":{"rendered":"Opportunity Costs: Definition, Function, and How to Calculate"},"content":{"rendered":"<p>Every business decision carries a hidden price\u2014the opportunity cost of what you give up to pursue another option. Understanding this concept is essential for managers aiming to optimize resources and make choices that align with their long-term goals.<\/p>\n<p>One of the managers&#8217; most prominent challenges is accurately identifying and calculating costs, especially when dealing with multiple investment options. Without clear insights, businesses risk losing potential gains or making costly trade-offs that hinder growth.<\/p>\n<p>A report by <a href=\"https:\/\/www.bnm.gov.my\/\" target=\"_blank\" rel=\"noopener\">Bank Negara Malaysia<\/a> reveals that many SMEs struggle with evaluating opportunity costs due to limited access to real-time financial data, leading to inefficient resource allocation. For more information, visit the official website: Bank Negara Malaysia.<\/p>\n<p>This article delves deeper into the definition, functions, and calculation methods of opportunity costs. Explore how implementing software solutions can simplify this process and empower your business to make smarter decisions.<\/p>\n<p><!-- <div id=\"toc_group_article\" style=''>\r\n\t<p style='font-size:25px;font-weight:bold; margin-bottom:0px'>\r\n\t\tTable of Content\r\n\t<\/p>\r\n\t<ul id=\"list_toc\" class='list_toc'><\/ul>\r\n<\/div>\r\n\r\n<div class=\"dropdown-fixed-top\" id=\"dropdown-fixed-top\">\r\n\t<div class=\"row\">\r\n\t\t<p id=\"pilihDaftarIsi\">Content Lists<\/p>\r\n\t\t<p><i class=\"td-icon-menu-down\"><\/i><\/p>\r\n\t<\/div>\r\n\t\r\n\t<div>\r\n\t\t<ul id=\"list_toc_top\" class='list_toc'><\/ul>\r\n\t<\/div>\r\n<\/div> -->\r\n\r\n<!-- TOC mobile -->\r\n<div id=\"placeholder-toc\"><\/div>\r\n<div id=\"toc\">\r\n    <div class=\"header\">\r\n\t<span class=\"toc-title\" id=\"toc-title\">Table of Content<\/span>\t\r\n\t <i class=\"toc-icon\">\r\n        <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"30\" height=\"30\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#000\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"header-icon\">\r\n          <path d=\"m6 9 6 6 6-6\" \/>\r\n        <\/svg>\r\n      <\/i>\r\n\t<\/div>\r\n    <div class=\"list\">\r\n      <ul id=\"toc-list\"><\/ul>\r\n    <\/div>\r\n <\/div>\r\n<!-- TOC mobile -->\r\n\r\n<style>\r\n\t@media (max-width: 992px) {\r\n\t\t#toc_group_article {\r\n\t\t\tpadding-top: 24px;\r\n\t\t}\r\n\t}\r\n\t\r\n\t#list_toc_float {\r\n\t\tmax-height: calc(100vh - 250px);\r\n\t\toverflow-y: auto;\r\n\t}\r\n\t\r\n\t#list_toc_top {\r\n\t\tdisplay: none;\r\n\t\tbackground: #fff;\r\n\t\tmargin-bottom: 4px;\r\n\t}\r\n\t\r\n\t#list_toc_top li {\r\n\t\tdisplay: block;\r\n\t\tmargin-left: 0;\r\n\t\tlist-style: none;\r\n\t}\r\n\t\r\n\t#list_toc_top a {\r\n\t\tpadding: 5px;\r\n\t\tdisplay: block;\r\n\t}\r\n\t\r\n\t#list_toc_top.show {\r\n\t\tdisplay: block;\r\n\t}\r\n\r\n\t#list_toc_top a {\r\n\t\tcolor: #434343;\r\n\t\tborder-bottom: 1px solid #bbb;\r\n\t}\r\n\t\r\n\t.dropdown-fixed-top {\r\n\t\tposition: fixed;\r\n\t\ttop: 59px;\r\n\t\twidth: 100%;\r\n\t\tz-index: 99;\r\n\t\tborder-bottom: 2px solid #9c171e;\r\n\t\tpadding: 12px;\r\n\t\tbackground: #fff;\r\n\t\twidth: 100%;\r\n\t\tcursor: pointer;\r\n\t\tdisplay: none;\r\n\t\tleft: 0;\r\n\t\tbox-shadow: 0 -2px 7px 6px rgba(0, 0, 0, 0.17);\r\n\t}\r\n\t\r\n\t#dropdown-fixed-top.show {\r\n\t\tanimation: showAnim 0.5s ease;\r\n\t\tdisplay: block;\r\n\t\topacity: 1;\r\n\t}\r\n\t\r\n\t@keyframes showAnim {\r\n\t\tfrom {\r\n\t\t\tdisplay: none;\r\n\t\t\topacity: 0;\r\n\t\t}\r\n\t\tto {\r\n\t\t\tdisplay: block;\r\n\t\t\topacity: 1;\r\n\t\t}\r\n\t}\r\n\t\r\n\t.dropdown-fixed-top #list_toc_top {\r\n\t\tmax-height: calc(50vh - 110px);\r\n\t\toverflow-y: scroll;\r\n\t}\r\n\t\r\n\t.dropdown-fixed-top .row {\r\n\t\tdisplay: flex;\r\n\t\tjustify-content: space-between\r\n\t}\r\n\t\r\n\t.dropdown-fixed-top .row p {\r\n\t\tmargin-bottom: 0;\r\n\t}\r\n\t\r\n\t#pilihDaftarIsi {\r\n\t\tmax-width: 100%;\r\n\t\toverflow: hidden;\r\n\t\twhite-space: nowrap;\r\n\t}\r\n\t\r\n\t@media (min-width: 1018px) {\r\n\t\t.dropdown-fixed-top {\r\n\t\t\tdisplay: none;\r\n\t\t}\r\n\t}\r\n\t\r\n\t#list_toc li {margin-bottom: 0;margin-top: 5px;}\r\n\t#list_toc > li > ul {padding-left: 20px;margin-bottom: 0;}\r\n\t#list_toc{height:max-content;transition:ease-in-out}\r\n\t#list_toc li {margin-bottom: 0;margin-top: 5px;}\r\n\t#list_toc_float li.active > a {color:#b1252d;background: #ffe1e3;}\r\n\t#list_toc_top li.active > a {color:#b1252d;background: #ffe1e3;}\r\n\t#list_toc_float li a {padding:3px 7px}\r\n\t#list_toc_float li a {\r\n\t\tdisplay: block;\r\n\t\tcolor: #000;\r\n\t\tmargin-bottom: 6px;\r\n\t\tpadding-top: 2px;\r\n\t\tpadding-bottom: 2px;\r\n\t\ttransition: all 0.2s ease-in-out;\r\n\t\tfont-size: 15px;\r\n\t\tline-height: 18px;\r\n\t}\r\n\t#list_toc_float li{list-style:none;list-style-position:inside; margin-left:0;}\r\n\t#list_toc_float a:hover{color:#b1252d;}\r\n\t\r\n\t#toc_group_float{\r\n\t\tline-height: 24px;\r\n\t\tmax-height: calc(100vh - 100px);\r\n\t\toverflow: auto;\r\n\t\tz-index: 99;\r\n\t\tdisplay:none!important;\r\n\t\tbackground:#fff;\r\n\t\ttransition:all 0.5s linear\r\n\t}\r\n\t\r\n\t@media (min-width:1019px){\r\n\t\t#toc_group_float {\r\n\t\t\tdisplay:block!important;\r\n\t\t}\r\n\t\t#toc_group_article {\r\n\t\t\tdisplay:none;\r\n\t\t}\t\t\t\t\r\n\t}\r\n\r\n<\/style>\r\n\r\n<style>\r\n\t@media (max-width: 992px) {\r\n\t\t#toc_group_article {\r\n\t\t\tpadding-top: 24px;\r\n\t\t}\r\n\t}\r\n\t\r\n\t#list_toc_float {\r\n\t\tmax-height: calc(100vh - 250px);\r\n\t\toverflow-y: auto;\r\n\t}\r\n\t\r\n\t#list_toc_top {\r\n\t\tdisplay: none;\r\n\t\tbackground: #fff;\r\n\t\tmargin-bottom: 4px;\r\n\t}\r\n\t\r\n\t#list_toc_top li {\r\n\t\tdisplay: block;\r\n\t\tmargin-left: 0;\r\n\t\tlist-style: none;\r\n\t}\r\n\t\r\n\t#list_toc_top a {\r\n\t\tpadding: 5px;\r\n\t\tdisplay: block;\r\n\t}\r\n\t\r\n\t#list_toc_top.show {\r\n\t\tdisplay: block;\r\n\t}\r\n\r\n\t#list_toc_top a {\r\n\t\tcolor: #434343;\r\n\t\tborder-bottom: 1px solid #bbb;\r\n\t}\r\n\t\r\n\t.dropdown-fixed-top {\r\n\t\tposition: fixed;\r\n\t\ttop: 59px;\r\n\t\twidth: 100%;\r\n\t\tz-index: 99;\r\n\t\tborder-bottom: 2px solid #9c171e;\r\n\t\tpadding: 12px;\r\n\t\tbackground: #fff;\r\n\t\twidth: 100%;\r\n\t\tcursor: pointer;\r\n\t\tdisplay: none;\r\n\t\tleft: 0;\r\n\t\tbox-shadow: 0 -2px 7px 6px rgba(0, 0, 0, 0.17);\r\n\t}\r\n\t\r\n\t#dropdown-fixed-top.show {\r\n\t\tanimation: showAnim 0.5s ease;\r\n\t\tdisplay: block;\r\n\t\topacity: 1;\r\n\t}\r\n\t\r\n\t@keyframes showAnim {\r\n\t\tfrom {\r\n\t\t\tdisplay: none;\r\n\t\t\topacity: 0;\r\n\t\t}\r\n\t\tto {\r\n\t\t\tdisplay: block;\r\n\t\t\topacity: 1;\r\n\t\t}\r\n\t}\r\n\t\r\n\t.dropdown-fixed-top #list_toc_top {\r\n\t\tmax-height: calc(50vh - 110px);\r\n\t\toverflow-y: scroll;\r\n\t}\r\n\t\r\n\t.dropdown-fixed-top .row {\r\n\t\tdisplay: flex;\r\n\t\tjustify-content: space-between\r\n\t}\r\n\t\r\n\t.dropdown-fixed-top .row p {\r\n\t\tmargin-bottom: 0;\r\n\t}\r\n\t\r\n\t#pilihDaftarIsi {\r\n\t\tmax-width: 100%;\r\n\t\toverflow: hidden;\r\n\t\twhite-space: nowrap;\r\n\t}\r\n\t\r\n\t@media (min-width: 1018px) {\r\n\t\t.dropdown-fixed-top {\r\n\t\t\tdisplay: none;\r\n\t\t}\r\n\t}\r\n\t\r\n\t#list_toc li {margin-bottom: 0;margin-top: 5px;}\r\n\t#list_toc > li > ul {padding-left: 20px;margin-bottom: 0;}\r\n\t#list_toc{height:max-content;transition:ease-in-out}\r\n\t#list_toc li {margin-bottom: 0;margin-top: 5px;}\r\n\t#list_toc_float li.active > a {color:#b1252d;background: #ffe1e3;}\r\n\t#list_toc_top li.active > a {color:#b1252d;background: #ffe1e3;}\r\n\t#list_toc_float li a {padding:3px 7px}\r\n\t#list_toc_float li a {\r\n\t\tdisplay: block;\r\n\t\tcolor: #000;\r\n\t\tmargin-bottom: 6px;\r\n\t\tpadding-top: 2px;\r\n\t\tpadding-bottom: 2px;\r\n\t\ttransition: all 0.2s ease-in-out;\r\n\t\tfont-size: 15px;\r\n\t\tline-height: 18px;\r\n\t}\r\n\t#list_toc_float li{list-style:none;list-style-position:inside; margin-left:0;}\r\n\t#list_toc_float a:hover{color:#b1252d;}\r\n\t\r\n\t#toc_group_float{\r\n\t\tline-height: 24px;\r\n\t\tmax-height: calc(100vh - 100px);\r\n\t\toverflow: auto;\r\n\t\tz-index: 99;\r\n\t\tdisplay:none!important;\r\n\t\tbackground:#fff;\r\n\t\ttransition:all 0.5s linear\r\n\t}\r\n\t\r\n\t@media (min-width:1019px){\r\n\t\t#toc_group_float {\r\n\t\t\tdisplay:block!important;\r\n\t\t\t}\r\n\t\t\t\t#toc_group_article {\r\n\t\t\tdisplay:none;\r\n\t\t}\r\n\t}\r\n\r\n<\/style>\r\n\r\n<!-- START ToC styling  -->\r\n<style>\r\n\t\/* Simple styling for the TOC *\/\r\n\t\r\n\t#toc ul li:last-child {\r\n    padding-bottom: 16px; \/* Adjust the value as needed *\/\r\n}\r\n\r\n.td-fix-index {\r\n\t transform: unset !important;\r\n     -webkit-transform: unset !important; \r\n}\r\n.footer-contact .td-fix-index {\r\n\t transform: translateZ(0) !important;\r\n     -webkit-transform: translateZ(0) !important; \r\n}\r\n\t.tdb_single_content .tdb-block-inner.td-fix-index{\r\n\t\tposition: static;\r\n\t}\r\n\t\r\n\r\n\t\r\n#toc {\r\n  background-color: #FFF;\r\n\tpadding: 17px 24px 0px 24px !important;\r\n  margin-bottom: 20px;\r\n\/*   border: 1px solid #9C171E; *\/\r\n  border-radius: 6px;\r\n\tdisplay: none;\r\n  max-width: 100%;\r\n  transition: .4s ease height;\r\n\tmargin-left: 0;\r\n\toverflow: hidden;\r\n}\r\n\r\n#toc .header{\r\n  display: flex;\r\n  align-items: center;\r\n  justify-content: space-between;\r\n\tbackground-color: transparent;\r\n}\r\n\t\r\n\t#toc.sticky .header{\r\n\t\tpadding: 4px 0;\r\n\t}\r\n\t\r\n.header p{\r\n  font-size: 18px !important;\r\n  font-weight: 600 !important;\r\n  color: #393939;\r\n   margin-bottom: 0;\r\n  \/* margin-top: 20px; *\/\r\n}\r\n\r\n.toc-icon{\r\n  float: right;\r\n\/*   visibility: hidden; *\/\r\n}\r\n\r\n\t.toc-title{\r\n\t\tmargin-right: auto;\r\n\/* \t\tpadding-left: 20px; *\/\r\n\t\tfont-weight: 600;\r\n\t\talign-self: center;\t}\t\r\n\r\n#toc ul {\r\n  list-style-type: none;\r\n  padding-left: 0;\r\n}\r\n\t\r\n#toc.sticky ul{\r\n\toverflow-y: auto;\r\n\tmax-height: 250px;\r\n\tmargin-top: 0px;\r\n\tpadding-top: 20px;\r\n\/* \tborder-top: 1px solid #d3d3d3; *\/\r\n}\r\n\t\r\n#toc ul li {\r\n\/*   margin-bottom: 10px; *\/\r\n  margin-bottom: 10px;\r\n\tmargin-left: 0;\r\n\ttransition: .2s ease;\r\n\tcursor: pointer;\r\n}\r\n\t\r\n\t#toc.sticky ul li {\r\n\t  margin-right: 10px;\r\n\t}\r\n\t\r\n.td-post-content #toc-list li a:hover, .td-post-content #toc-list a.active{\r\n\tbackground-color: #FFF;\r\n\/* \tpadding: 8px 16px 8px 16px; *\/\r\n\tpadding: 4px 16px 4px 16px;\r\n\tborder-radius: 6px;\r\n\tcolor: #9c171e !important;\r\n\tfont-weight: 600 !important;\r\n}\r\n\t\r\n\t.td-post-content #toc-list li:hover a, .td-post-content #toc-list a.active{\r\n\t\tcolor: #9C171E !important;\r\n\t\tfont-weight: 600 !important;\r\n\t}\r\n\t\r\n.td-post-content #toc-list a.active{\r\n\tfont-weight: bold !important;\r\n\tcolor: #9C171E !important;\r\n}\r\n\t\r\n#toc a, .td-post-content #toc-list a {\r\n  text-decoration: none;\r\n  color: #ea1717 !important;\r\n  transition: .2s ease;\r\n\tfont-weight: 400 !important;\r\n\tdisplay: block;\r\n\t\r\n\tpadding: 4px 16px 4px 0;\r\n}\r\n\r\n#toc.sticky {\r\n  position: fixed;\r\n\/*   top: 73px; *\/\r\n\tbottom: 0;\r\n  z-index: 100; \r\n  box-shadow: 0 2px 5px rgba(0,0,0,0.1); \r\n\twidth: 100%; \r\n\tbackground-color: #FFF;\r\n\/* \tbackground-color: #FFF1F1; *\/\r\n\tborder-bottom: 1px solid #ea1717;\r\n\/*   border: 1px solid #393939; *\/\r\n  box-shadow: 0px 0px 14px 0px #00000040;\r\n  cursor: pointer;\r\n\tanimation: fadein .3s ease;\r\n\tpadding: 12px 16px !important;\r\n}\r\n\t\r\n\t.fadein{\r\n\t\tanimation: fadein .3s ease;\r\n\t}\r\n\t\r\n\t.fadeout{\r\n\t\tanimation: fadeout .3s ease;\r\n\t}\r\n\t\r\n\t\r\n\t@keyframes fadein{\r\n\t\t0% {\r\n\t\t\topacity: 0;\r\n\t\t}\r\n\t\t100%{\r\n\t\t\topacity: 1;\r\n\t\t}\r\n\t}\r\n\t\r\n\t@keyframes fadeout{\r\n\t\t0% {\r\n\t\t\topacity: 1;\r\n\t\t}\r\n\t\t100%{\r\n\t\t\topacity: 0;\r\n\t\t}\r\n\t}\r\n\r\n\t\r\n#toc.sticky .header p{\r\n\tmargin-bottom: 10px;\r\n\tmargin-top: 10px;\r\n}\r\n\r\n#toc.sticky .toc-icon{\r\n  visibility: visible;\r\n\/* \ttransition: 0.4s ease; *\/\r\n}\r\n\t\r\n\t.toc-icon{\r\n\t\talign-items: center;\r\n    \tdisplay: flex;\r\n\t}\r\n\t\r\n\tsvg.header-icon{\r\n\/* \t\tbackground-color: #9c171e; *\/\r\n\t\tbackground-color: #FFF;\r\n\t\tborder-radius: 30px;\r\n\t\tpadding: 5px;\r\n\t}\r\n\r\n#toc.sticky .list{\r\n\/*   max-height: 0; *\/\r\n  transition: height 0.4s ease;\r\n}\r\n\t\r\n\t#toc .list{\r\n\/*   max-height: 0; *\/\r\n  transition: height 0.4s ease;\r\n}\r\n\r\n#toc .header.active .toc-icon{\r\n\ttransform: rotate(0deg); \r\n\topacity: 1;\r\n}\r\n\r\n\t#toc .header.active + .list {\r\n\t  max-height: 200px; \/* Adjust this value as needed *\/\r\n\t  opacity: 1;\r\n\t}\r\n\t\r\n\t#placeholder-toc{\r\n\/* \t\tdisplay: none; *\/\r\n\t}\r\n\t\r\n\t@media (min-width: 768px) and (max-width: 991px){\r\n\t\t#toc.sticky{\r\n\/* \t\t\ttop: 104px; *\/\r\n\t\t\tbottom: 0px;\r\n\t\t}\r\n\t\t\r\n\t\t#toc{\r\n\t\t\twidth: unset !important;\r\n\t\t}\r\n\t}\r\n\t\r\n\t@media (max-width: 767px){\r\n\t\t#toc{\r\n\t\t\twidth: 100% !important;\r\n\t\t\tdisplay: inline-block;\r\n\t\t}\r\n\t\t\r\n\t\t#toc.sticky{\r\n\t\t\twidth: 90% !important;\r\n\/* \t\t\ttop: 81px; *\/\r\n\t\t\tbottom: 60px;\r\n\t\t\tmargin-left: auto;\r\n\t\t\tmargin-right: auto;\r\n\t\t\tpadding: 0 16px;\r\n\t\t\tright: 5%;\r\n\t\t}\r\n\t}\r\n\t\r\n\t<\/style>\r\n<!-- END ToC styling  -->\r\n\r\n<!-- ToC List for mobile -->\r\n<script>\r\n \/\/ Generate TOC based on headings\r\ndocument.addEventListener(\"DOMContentLoaded\", function() {\r\n  \/\/ Get the element that will contain the TOC\r\n  const tocList = document.getElementById('toc-list');\r\n\r\n  \/\/ Get the element with the ID 'article-left'\r\n  const article = document.querySelector('.td-post-content');\r\n\r\n  \/\/ Find all h2 elements within 'myarticle'\r\n  const headers = article.getElementsByTagName('h2');\r\n\r\n  \/\/ Loop through the h2 elements and create a list item for each one\r\n  for (let i = 0; i < headers.length; i++) {\r\n    const header = headers[i];\r\n    const headerText = header.textContent;\r\n\/\/     const headerId = 'header-' + i;\r\n    const headerId = headerText\r\n    .toLowerCase()\r\n    .trim()\r\n    .replace(\/[^\\w\\s-]\/g, '')  \/\/ hapus tanda baca\r\n    .replace(\/\\s+\/g, '-'); \/\/ ganti spasi jadi \"-\"\r\n\r\n    \/\/ Set an ID for the header if it doesn't have one\r\n    header.setAttribute('id', headerId);\r\n\r\n    \/\/ Create a list item for the TOC\r\n    const listItem = document.createElement('li');\r\n\r\n    \/\/ Create a link for the list item\r\n    const link = document.createElement('a');\r\n    link.setAttribute('href', '#' + headerId);\r\n    link.textContent = headerText;\r\n\r\n    \/\/ Append the link to the list item\r\n    listItem.appendChild(link);\r\n\r\n    \/\/ Append the list item to the TOC list\r\n    tocList.appendChild(listItem);\r\n  }\r\n});\r\n\r\n\/\/ Keep height and placement of content using placeholder in place of TOC\r\ndocument.addEventListener(\"DOMContentLoaded\", function() {\r\n  const toc = document.querySelector('#toc');\r\n  const placeholderToc = document.querySelector('#placeholder-toc');\r\n\r\n  function setPlaceholderHeight() {\r\n    placeholderToc.style.height = `${toc.offsetHeight}px`;\r\n  }\r\n\r\n  \/\/ Set the initial height of the placeholder\r\n  setPlaceholderHeight();\r\n\r\n  \/\/ Update the height on window resize\r\n  window.addEventListener('resize', setPlaceholderHeight);\r\n});\r\n  const tocTitle = document.querySelector('#toc-title'); \/\/ Assuming header-faq is the element for TOC title\r\n\r\n\/\/ Sticky TOC and update heading\r\ndocument.addEventListener(\"DOMContentLoaded\", function() {\r\n  const toc = document.querySelector('#toc');\r\n  const footer = document.querySelector('.td-footer-template-wrap');\r\n  const tocParent = toc.parentElement;\r\n  const divTop = tocParent.getBoundingClientRect().top + window.pageYOffset;\r\n  const tocHeight = toc.offsetHeight;\r\n  const triggerPoint = divTop + tocHeight + 700;\r\n  const footerHeight = footer.offsetHeight;\r\n  const triggerFooterPoint = footer.getBoundingClientRect().top + window.pageYOffset - footerHeight - footerHeight - footerHeight;\r\n  const phtoc = document.querySelector('#placeholder-toc');\r\n  const headers = document.querySelectorAll('.td-post-content h2');\r\n  const navLinks = document.querySelectorAll('#toc-list a');\r\n\t\r\n\tconst panel2 = document.querySelector(\"#toc .list\");\r\n\tvar icon = document.querySelector(\".toc-icon\");\r\n\r\n  let activeLink = null; \/\/ Declare activeLink outside the loop\r\n\t\r\n  \/\/ Function to handle scroll and add\/remove .sticky class\r\n  function handleScroll() {\r\n    const windowTop = window.pageYOffset || document.documentElement.scrollTop;\r\n    let currentHeader = '';\r\n\r\n    \/\/ Highlight user progress as the heading comes\r\n    headers.forEach(header => {\r\n\t\tconst headerTop = header.offsetTop;\r\n\t\tconst headerHeight = header.clientHeight;\r\n\t\tif (window.scrollY >= (headerTop - headerHeight + 700)) {\r\n\t\t\tconst currentHeaderId = header.getAttribute('id');\r\n\t\t\tconst currentHeaderText = document.getElementById(currentHeaderId).textContent;\r\n\/\/ \t\t\tconsole.log(\"current header text:\", currentHeaderText);\r\n\t\t\ttocTitle.textContent = currentHeaderText;\r\n\t\t\tcurrentHeader = currentHeaderId;\r\n\t\t\t\r\n\t\t\tif(window.innerWidth < 767){\r\n\t\t\t\ttocTitle.textContent = 'Table of Content';\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\r\n    navLinks.forEach(link => {\r\n      link.classList.remove('active');\r\n      if(currentHeader != '') {\r\n\t\t  if (link.getAttribute('href').includes(currentHeader)) {\r\n\t\t\t  link.classList.add('active');\r\n\t\t  }\r\n\t  }\r\n    });\r\n\/\/     if (windowTop < triggerFooterPoint) {\r\n\/\/         toc.style.display = 'block';\r\n\/\/ \t}else{\r\n\/\/         toc.style.display = 'none';\r\n\/\/ \t}\r\n    \/\/ Update TOC title if sticky\r\n    if (windowTop > triggerPoint) {\r\n      if (!toc.classList.contains('sticky')) {\r\n        phtoc.style.display = \"block\";\r\n        toc.classList.add('sticky');\r\n        toc.style.width = `${tocParent.offsetWidth}px`; \/\/ Set width to match the parent element\r\n        toc.setAttribute('style', 'width: ' + tocParent.offsetWidth + 'px !important;');\r\n        toc.style.backgroundColor = \"#FFF\";\r\n\t\tpanel2.style.height = '0px';\r\n\t\t  icon.style.transform = \"rotate(180deg)\";\r\n\t\t  if(window.innerWidth < 767){\r\n\/\/ \t\t\t  const tocs = document.querySelector('#toc.sticky');\r\n\t\t\t  tocTitle.textContent = 'Table of Content'; \/\/ Reset title\r\n       \t\t  toc.style.width = '150px'; \/\/ Set width to match the parent element\r\n\t\t  }\r\n      }\r\n      if (currentHeader) {\r\n\/\/         console.log(\"activeLink:\", activeLink);\r\n        if (activeLink) {\r\n\/\/           tocTitle.textContent = activeLink.textContent; \/\/ Update TOC title\r\n          tocTitle.textContent = activeLink ? activeLink.textContent : \"\"; \/\/ Update title only if activeLink exists\r\n        }\r\n      }\r\n    } else {\r\n      toc.classList.remove('sticky');\r\n      phtoc.style.display = \"none\";\r\n      toc.style.width = 'unset'; \/\/ Reset to original width\r\n      toc.style.backgroundColor = \"#FFF\";\r\n      tocTitle.textContent = 'Table of Content'; \/\/ Reset title\r\n\t\tpanel2.style.height = panel2.scrollHeight + \"px\";\r\n\t\ticon.style.transform = \"rotate(180deg)\";\r\n    }\r\n  }\r\n\r\n    \/\/ Attach the scroll event listener to the window\r\n    window.addEventListener('scroll', handleScroll);\r\n\r\n    \/\/ Initial call to handleScroll to set the correct state on load\r\n    handleScroll();\r\n});\r\n\t\r\n\t\/\/ Open toggle TOC\r\n\t  document.addEventListener(\"DOMContentLoaded\", function() {\r\n\t\tvar tocHeader = document.querySelector(\"#toc .header\");\r\n\t\tvar toc = document.querySelector(\"#toc\");\r\n\t\tvar icon = document.querySelector(\".toc-icon\");\r\n\t\tconst tocTitle = document.querySelector('#toc-title');\r\n\t\tconst tocs = document.querySelector('#toc.sticky');\r\n \t\tconst tocParent = toc.parentElement;\t\t  \r\n\r\n\t\t  tocHeader.addEventListener(\"click\", function() {\r\n\t\t\tvar panel = this.nextElementSibling;\r\n\t\t\tif (panel.style.height !== '0px') { \/\/ Check if height is not 0px\r\n\t\t\t  panel.style.height = '0px'; \/\/ Set height to 0 for full collapse\r\n\t\t\t  icon.style.transform = \"rotate(180deg)\";\r\n\/\/ \t\t\t\ttoc.style.paddingBottom = '6px'; \r\n\t\t\t\tif(window.innerWidth > 768){\r\n\t\t\t\t\tif(!toc.classList.contains('sticky')){\r\n\t\t\t\t\t\ttoc.style.width = \"unset\";\r\n\/\/ \t\t\t\t\t\ttoc.setAttribute('style', 'width: ' + tocParent.offsetWidth + 'px !important;');\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (toc.classList.contains('sticky')){\r\n\t\t\t\t\t\ttoc.style.width = '${tocParent.offsetWidth}px';\r\n\t\t\t\t\t\ttoc.setAttribute('style', 'width: ' + tocParent.offsetWidth + 'px !important;');\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif(window.innerWidth < 767){\r\n\t\t\t\t\ttoc.style.width = \"unset\"; \/\/ Reset width\r\n\t\t\t\t}\r\n\t\t\t\ttoc.style.backgroundColor = \"#FFF1F1\";\r\n\t\t\t} else {\r\n\t\t\t  panel.style.height = panel.scrollHeight + \"px\";\r\n\t\t\t  icon.style.transform = \"rotate(0deg)\";\r\n\t\t\t  toc.style.backgroundColor = \"#FFF\";\r\n\t\t\t  tocTitle.textContent = 'Table of Content'; \/\/ Reset title\r\n\t\t\t\ttoc.style.paddingBottom = '24px';\r\n\t\t\t \tif(window.innerWidth < 767){\r\n\t\t\t\t\ttoc.style.width = `${tocParent.offsetWidth}px`; \/\/ Set width to match the parent element\r\n\t\t\t\t\ttoc.setAttribute('style', 'width: ' + tocParent.offsetWidth + 'px !important;');\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t  });\r\n\r\n\t\t  \/\/ Close TOC when a link inside it is clicked\r\n\t\t  var tocLinks = document.querySelectorAll(\"#toc .list a\");\r\n\t\t  tocLinks.forEach(function(link) {\r\n\t\t\tlink.addEventListener(\"click\", function() {\r\n\t\t\t  var panel = document.querySelector(\"#toc .list\");\r\n\t\t\t  panel.style.height = '0px'; \/\/ Set height to 0 for full collapse\r\n\t\t\t  icon.style.transform = \"rotate(180deg)\";\r\n\t\t\t  toc.style.backgroundColor = \"#FFF\";\r\n\t\t\t});\r\n\t\t  });\r\n\t\t});\r\n<\/script>\r\n\r\n<!-- <script>\r\n\tvar pilihDaftarIsi = document.getElementById('pilihDaftarIsi');\r\n\t\r\n\tdocument.addEventListener('DOMContentLoaded', function() {\r\n\t\tvar dropdownFixedTop = document.querySelector('.dropdown-fixed-top');\r\n\r\n\t\tdropdownFixedTop.addEventListener('click', function() {\r\n\t\t\tvar dropdownContent = this.querySelector('.list_toc');\r\n\t\t\tdropdownContent.classList.toggle('show');\r\n\t\t});\r\n\r\n\t\twindow.addEventListener('click', function(event) {\r\n\t\t\tvar listTocTop = document.getElementById('list_toc_top');\r\n\r\n\t\t\tif (!dropdownFixedTop.contains(event.target)) {\r\n\t\t\t\tlistTocTop.classList.remove('show');\r\n\t\t\t}\r\n\t\t});\r\n\t});\r\n\t\r\n\tvar daftarIsiContainer = document.getElementById('toc_group_article');\r\n\tvar dropdownFixedTop = document.getElementById('dropdown-fixed-top');\r\n    var triggered = false; \/\/ Flag to keep track of whether the function has been triggered\r\n\r\n    window.addEventListener('scroll', function() {\r\n        if (!triggered && isCompletelyScrolledPast(daftarIsiContainer)) {\r\n            showSectionDropdownFixedTop(false);\r\n            triggered = true;\r\n        } else if (triggered && !isCompletelyScrolledPast(daftarIsiContainer)) {\r\n            showSectionDropdownFixedTop(true);\r\n            triggered = false;\r\n        }\r\n    });\r\n\r\n    function isCompletelyScrolledPast(element) {\r\n        var elementTop = element.getBoundingClientRect().top;\r\n        var elementBottom = element.getBoundingClientRect().bottom;\r\n        return elementTop < 0 && elementBottom < 0;\r\n    }\r\n\r\n    function showSectionDropdownFixedTop(show) {\r\n\t\tif (show) {\r\n\t\t\tdropdownFixedTop.classList.remove(\"show\");\r\n\t\t} else {\r\n\t\t\tdropdownFixedTop.classList.add(\"show\");\r\n\t\t}\r\n    }\r\n\r\n\/\/ Scrollspy function to highlight the active TOC item based on the scroll position\r\n  function scrollSpy(tocClass) {\r\n    const scrollPosition = window.scrollY;\r\n\r\n    \/\/ Find the active h2 and h3 headings based on their position in the corresponding TOC\r\n    let activeH2 = null;\r\n    let activeH3 = null;\r\n\r\n    const tocItems = document.querySelectorAll(`.${tocClass} li`);\r\n    tocItems.forEach(item => {\r\n      const a = item.querySelector('a');\r\n      if (!a) return;\r\n      const href = a.getAttribute('href');\r\n      const targetId = href.substring(1); \/\/ Remove the '#' from the href to get the target ID\r\n      const targetElement = document.getElementById(targetId);\r\n      if (!targetElement) return;\r\n\r\n      const targetTop = targetElement.getBoundingClientRect().top + scrollPosition;\r\n      const nextItem = item.nextElementSibling;\r\n      const nextTop = nextItem ? nextItem.getBoundingClientRect().top + scrollPosition : Infinity;\r\n\r\n      if (targetTop <= scrollPosition + 150) {\r\n        if (a.parentElement.parentElement === tocItems) {\r\n          \/\/ The h2 heading is at the root level of the TOC\r\n          activeH2 = { id: targetId, level: 'h2' };\r\n        } else {\r\n          \/\/ The h3 heading is nested under an h2 heading\r\n          const parentH2 = a.parentElement.parentElement.previousElementSibling;\r\n          if (parentH2) {\r\n            const h2Link = parentH2.querySelector('a');\r\n            if (h2Link) {\r\n              const h2Href = h2Link.getAttribute('href');\r\n              const h2Id = h2Href.substring(1);\r\n              activeH2 = { id: h2Id, level: 'h2' };\r\n            }\r\n          }\r\n          activeH3 = { id: targetId, level: 'h3' };\r\n        }\r\n      }\r\n\r\n      if (targetTop > scrollPosition + 150 && nextTop > scrollPosition + 150 && !activeH3) {\r\n        \/\/ Reset the activeH2 when there are no more active h3 headings\r\n        activeH2 = null;\r\n      }\r\n    });\r\n\r\n    \/\/ Update the active state for the TOC items\r\n    tocItems.forEach(item => {\r\n      item.classList.remove('active');\r\n      const a = item.querySelector('a');\r\n      if (a) {\r\n        const href = a.getAttribute('href');\r\n        const targetId = href.substring(1);\r\n        if ((activeH2 && activeH2.id === targetId) || (activeH3 && activeH3.id === targetId)) {\r\n          item.classList.add('active');\r\n\t\t  pilihDaftarIsi.innerHTML = a.textContent;\r\n        }\r\n      }\r\n    });\r\n  }\r\n\r\n  \/\/ Call scrollSpy for each TOC on window scroll\r\n  const tocClasses = ['list_toc', 'list_toc_float', 'list_toc_top']; \/\/ Add other TOC class names here if you have more than two instances\r\n  tocClasses.forEach(tocClass => {\r\n    window.addEventListener('scroll', () => scrollSpy(tocClass));\r\n  });\r\n<\/script> -->\r\n<!-- END script lama -->\r\n\t\r\n<script>\r\n    \/\/ Scrollspy function to highlight the active TOC item based on the scroll position\r\n  function scrollSpy(tocClass) {\r\n    const scrollPosition = window.scrollY;\r\n\r\n    \/\/ Find the active h2 and h3 headings based on their position in the corresponding TOC\r\n    let activeH2 = null;\r\n    let activeH3 = null;\r\n\r\n    const tocItems = document.querySelectorAll(`.${tocClass} li`);\r\n    tocItems.forEach(item => {\r\n      const a = item.querySelector('a');\r\n      if (!a) return;\r\n      const href = a.getAttribute('href');\r\n      const targetId = href.substring(1); \/\/ Remove the '#' from the href to get the target ID\r\n      const targetElement = document.getElementById(targetId);\r\n      if (!targetElement) return;\r\n\r\n      const targetTop = targetElement.getBoundingClientRect().top + scrollPosition;\r\n      const nextItem = item.nextElementSibling;\r\n      const nextTop = nextItem ? nextItem.getBoundingClientRect().top + scrollPosition : Infinity;\r\n\r\n      if (targetTop <= scrollPosition + 150) {\r\n        if (a.parentElement.parentElement === tocItems) {\r\n          \/\/ The h2 heading is at the root level of the TOC\r\n          activeH2 = { id: targetId, level: 'h2' };\r\n        } else {\r\n          \/\/ The h3 heading is nested under an h2 heading\r\n          const parentH2 = a.parentElement.parentElement.previousElementSibling;\r\n          if (parentH2) {\r\n            const h2Link = parentH2.querySelector('a');\r\n            if (h2Link) {\r\n              const h2Href = h2Link.getAttribute('href');\r\n              const h2Id = h2Href.substring(1);\r\n              activeH2 = { id: h2Id, level: 'h2' };\r\n            }\r\n          }\r\n          activeH3 = { id: targetId, level: 'h3' };\r\n        }\r\n      }\r\n\r\n      if (targetTop > scrollPosition + 150 && nextTop > scrollPosition + 150 && !activeH3) {\r\n        \/\/ Reset the activeH2 when there are no more active h3 headings\r\n        activeH2 = null;\r\n      }\r\n    });\r\n\r\n    \/\/ Update the active state for the TOC items\r\n    tocItems.forEach(item => {\r\n      item.classList.remove('active');\r\n      const a = item.querySelector('a');\r\n      if (a) {\r\n        const href = a.getAttribute('href');\r\n        const targetId = href.substring(1);\r\n        if ((activeH2 && activeH2.id === targetId) || (activeH3 && activeH3.id === targetId)) {\r\n          item.classList.add('active');\r\n        }\r\n      }\r\n    });\r\n  }\r\n\r\n  \/\/ Call scrollSpy for each TOC on window scroll\r\n  const tocClasses = ['list_toc', 'list_toc_float', 'list_toc_top']; \/\/ Add other TOC class names here if you have more than two instances\r\n  tocClasses.forEach(tocClass => {\r\n    window.addEventListener('scroll', () => scrollSpy(tocClass));\r\n  });\r\n<\/script>\r\n\t\r\n\r\n<!-- ToC List for desktop side bar, diganti jadi inject by php, di code snippet \"Sidebar Accordion\" -->\r\n<!-- <script>\r\n\tdocument.addEventListener('DOMContentLoaded', function() {\r\n        \/\/ Fungsi untuk mengubah teks menjadi format id\r\n        function formatId(text) {\r\n            return text.trim().replace(\/[^\\w\\d]+\/g, '_');\r\n        }\r\n\r\n        \/\/ Fungsi untuk membuat nested list\r\n        function createNestedList(parentNode, children) {\r\n            if (children.length === 0) return;\r\n\r\n            const nestedUl = document.createElement('ul');\r\n            children.forEach(child => {\r\n                const nestedLi = document.createElement('li');\r\n                const nestedA = document.createElement('a');\r\n                nestedA.textContent = child.title;\r\n                nestedA.href = `#${child.id}`;\r\n                nestedLi.appendChild(nestedA);\r\n                nestedUl.appendChild(nestedLi);\r\n\r\n                if (child.children.length > 0) {\r\n                    createNestedList(nestedLi, child.children);\r\n                }\r\n            });\r\n\r\n            parentNode.appendChild(nestedUl);\r\n        }\r\n\r\n        \/\/ Membuat objek untuk menyimpan daftar h2 dan h3 beserta judulnya\r\n        const headings = [];\r\n\r\n           \/\/ Mengambil semua elemen h2 dan h3\r\n        const elements = document.querySelectorAll('.td-post-content h2');\r\n\t\t\t\/\/, .td-post-content h3\r\n\r\n        elements.forEach(element => {\r\n            if (element.tagName === 'H2') {\r\n                const id = formatId(element.textContent);\r\n                element.id = id;\r\n\t\t\t\tif(element.textContent.toLowerCase() === \"key takeaways\") {return;} \/\/ Biar ga nampilin Key Takeaways di ToC\r\n                headings.push({ level: 'h2', id: id, title: element.textContent, children: [] });\r\n            } else if (element.tagName === 'H3') {\r\n                const id = formatId(element.textContent);\r\n                element.id = id;\r\n                if (headings.length > 0) {\r\n                    headings[headings.length - 1].children.push({ level: 'h3', id: id, title: element.textContent, children: [] });\r\n                }\r\n            }\r\n        });\r\n\r\n        \/\/ Membuat list HTML dari objek headings\r\n        const ul = document.getElementById('list_toc');\r\n        let currentUl = ul;\r\n        headings.forEach(heading => {\r\n            const li = document.createElement('li');\r\n            const a = document.createElement('a');\r\n            a.textContent = heading.title;\r\n            a.href = `#${heading.id}`;\r\n            li.appendChild(a);\r\n\r\n            if (heading.level === 'h2') {\r\n                \/\/ Menyimpan ul saat ini untuk menambahkan nested ul\r\n                currentUl = li;\r\n                ul.appendChild(li);\r\n            } else if (heading.level === 'h3') {\r\n                if (!currentUl.lastElementChild || currentUl.lastElementChild.tagName !== 'UL') {\r\n                    \/\/ Jika belum ada nested ul, buat satu\r\n                    const nestedUl = document.createElement('ul');\r\n                    currentUl.appendChild(nestedUl);\r\n                    currentUl = nestedUl;\r\n                }\r\n                currentUl.appendChild(li);\r\n            }\r\n\r\n            createNestedList(li, heading.children);\r\n        });\r\n\t\t\/\/ Dapatkan elemen ul dengan id 'list_toc_float'\r\nconst ulFloat = document.getElementById('list_toc');\r\nconst ulJourney = document.getElementById('list_journey');\r\n\r\n\/\/ Dapatkan isi (child elements) dari ul dengan id 'list_toc_float'\r\n\tif (ulFloat !== null) {\r\n\t\tconst clonedChildren = ulFloat.cloneNode(true).children;\r\n\t\tconst ulToc = document.getElementById('list_toc_float');\r\n\t\tconst ulTocTop = document.getElementById('list_toc_top');\r\n\t\tif ((ulToc !== null || ulToc !== undefined) && window.innerWidth > 1018){\r\n\t\t\tulToc.append(...clonedChildren);\r\n\t\t} else {\r\n\t\t\tulTocTop.append(...clonedChildren);\r\n\t\t}\r\n\t} \r\n\r\n\tif (ulJourney !== null) {\r\n\t\tconst clonedChildrenJourney = ulJourney.cloneNode(true).children;\r\n\t\tconst ulTocJourney = document.getElementById('list_toc_journey');\r\n\t\tulTocJourney.append(...clonedChildrenJourney);\r\n\t} \r\n\r\n\r\n\r\n\r\n\t\r\n        \/\/ Fungsi untuk mengambil tinggi navbar\r\n        function getNavbarHeight() {\r\n            const navbar = document.getElementById('tdi_34');\r\n            return navbar ? navbar.offsetHeight : 0;\r\n        }\r\n\r\n        \/\/ Fungsi untuk menambahkan offset posisi scroll\r\n        function scrollToElementWithOffset(elementId) {\r\n            const element = document.getElementById(elementId);\r\n            if (element) {\r\n                const offset = getNavbarHeight();\r\n                const elementPosition = element.getBoundingClientRect().top;\r\n                const offsetPosition = elementPosition - offset-40;\r\n\r\n                window.scrollBy({\r\n                    top: offsetPosition,\r\n                    behavior: 'smooth'\r\n                });\r\n            }\r\n        }\r\n\r\n        \/\/ Fungsi untuk menangani klik pada tautan judul\r\n        function handleTitleClick(event) {\r\n            event.preventDefault();\r\n            const href = event.target.getAttribute('href').substr(1);\r\n            scrollToElementWithOffset(href);\r\n        }\r\n\r\n        \/\/ Tambahkan event listener untuk semua tautan judul\r\n        const titleLinks = document.querySelectorAll('a[href^=\"#\"]');\r\n        titleLinks.forEach(link => {\r\n            link.addEventListener('click', handleTitleClick);\r\n        });\r\n\t});\r\n    <\/script> -->\r\n<!-- \t<style>#toc_group_float{display:block !important}<\/style> -->\r\n <a href=\"https:\/\/www.hashmicro.com\/my\/free-product-demo\/?medium=free-product-demo\" target=\"_blank\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/08\/free-demo-desktop-my.webp\" data-desktop-src=\"https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/08\/free-demo-desktop-my.webp\" data-mobile-src=\"https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2024\/07\/free-demo-mobile-my.jpg\" alt=\"FreeDemo\" class=\"responsive-image-banner\"><\/a>\r\n\r\n<script>\r\n    \/\/ check which image to use based on screensize\r\n    document.addEventListener(\"DOMContentLoaded\", function() {\r\n        function updateImageSource() {\r\n            var images = document.querySelectorAll('.responsive-image-banner');\r\n            var screenWidth = window.innerWidth;\r\n\r\n            images.forEach(function(img) {\r\n                var mobileSrc = img.getAttribute('data-mobile-src');\r\n                var desktopSrc = img.getAttribute('data-desktop-src');\r\n\r\n                if (screenWidth < 576 && mobileSrc) {\r\n                    img.setAttribute('src', mobileSrc);\r\n                } else {\r\n                    img.setAttribute('src', desktopSrc);\r\n                }\r\n            });\r\n        }\r\n\r\n        \/\/ Initial check\r\n        updateImageSource();\r\n\r\n        \/\/ Update on resize\r\n        window.addEventListener('resize', updateImageSource);\r\n    });\r\n<\/script><\/p>\n<table style=\"border-collapse: collapse; background-color: #fffacd; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); border-radius: 25px 25px 25px 25px;\" width=\"100%\">\n<tbody>\n<tr>\n<td style=\"padding: 15px; border: none;\">\n<h3 style=\"margin-bottom: 10px;\"><span style=\"background-color: #990000; color: #ffffff; padding: 5px;\"><b>Key Takeaways<\/b><\/span><\/h3>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\">Understanding opportunity cost helps managers evaluate trade-offs and prioritize strategies that maximize returns and align with long-term goals.<\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\">Many businesses face difficulties calculating opportunity costs due to limited access to real-time financial data, leading to inefficient resource allocation and lost potential. With <a href=\"#hashmicro-accounting-software\">the right software<\/a>, you can unlock those benefits and make more informed decisions to maximize your opportunities.<\/li>\n<li aria-level=\"1\">HashMicro\u2019s <a href=\"https:\/\/www.hashmicro.com\/my\/blog\/best-accounting-software\/\">accounting software<\/a> is one of the best solutions for simplifying opportunity cost analysis with real-time data and automation. Its powerful features empower businesses to make accurate financial decisions and optimize resources effectively.<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><strong>What Is Opportunity Cost?<\/strong><\/h2>\n<p>Opportunity cost refers to the value of the best alternative forgone when choosing one option over another. In economics, this concept highlights that every decision involves trade-offs, as resources spent on one action cannot be used elsewhere.<\/p>\n<p>In business, opportunity cost is crucial for economic decision-making as it evaluates the potential benefits lost from the unchosen alternative. For instance, an entrepreneur deciding between hiring a marketing director for $80,000 per year or investing $3,000 per month in marketing software must consider the cost of each decision.<\/p>\n<p>Understanding the opportunity cost formula allows individuals and businesses to quantify the trade-offs of choices effectively. Whether choosing between stocks or bonds or deciding on operational priorities, this concept ensures informed decisions.<\/p>\n<h2><strong>Example of Opportunity Cost Implementation<\/strong><\/h2>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-1861\" src=\"https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/01\/opportunity-cost-1.jpg\" alt=\"opportunity cost\" width=\"1200\" height=\"675\" srcset=\"https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/01\/opportunity-cost-1.jpg 1200w, https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/01\/opportunity-cost-1-300x169.jpg 300w, https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/01\/opportunity-cost-1-1024x576.jpg 1024w, https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/01\/opportunity-cost-1-768x432.jpg 768w, https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/01\/opportunity-cost-1-747x420.jpg 747w, https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/01\/opportunity-cost-1-150x84.jpg 150w, https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/01\/opportunity-cost-1-696x392.jpg 696w, https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/01\/opportunity-cost-1-1068x601.jpg 1068w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/><\/p>\n<p>Opportunity cost is critical in economic decision-making, influencing how resources are allocated to achieve the best possible outcomes. Whether at the individual, business, or government level, understanding trade-offs, including their impact on <a href=\"https:\/\/www.hashmicro.com\/my\/blog\/unit-cost\/\">storage unit cost <\/a>analysis, helps prioritize actions that deliver the greatest overall benefit.<\/p>\n<p>Below are several examples that illustrate the meaning of opportunity cost in real-world scenarios. These examples highlight the importance of rational thinking and the cost formula in evaluating decisions effectively.<\/p>\n<h3>1. War costs<\/h3>\n<p>The financial allocation for war efforts exemplifies opportunity cost in national economic decision-making. For instance, dedicating $870 billion to military supplies means sacrificing choices like education, healthcare, or tax reductions.<\/p>\n<p>Which could foster long-term social and economic growth. This trade-off analysis underscores the importance of assessing the opportunity cost formula to determine how to allocate limited resources effectively.<\/p>\n<h3>2. Expenditures for new roads<\/h3>\n<p>Investing in new road construction demonstrates opportunity cost by prioritizing infrastructure over other public needs. While better roads may enhance transportation and connectivity, the opportunity cost is the potential benefits lost from not funding choices like improved <a href=\"https:\/\/www.hashmicro.com\/my\/blog\/best-school-management-software\/\">education<\/a> or healthcare systems.<\/p>\n<p>Utilizing tools like <a href=\"https:\/\/www.hashmicro.com\/my\/blog\/best-construction-procurement-software\/\">construction procurement software<\/a> can help governments and businesses analyze these trade-offs more effectively, ensuring economic decision-making that balances immediate gains with long-term societal benefits.<\/p>\n<h3>3. Tax rebates<\/h3>\n<p>When governments implement income tax cuts, they encounter opportunity costs by reducing tax revenue that could fund essential services. The trade-off lies between offering immediate financial relief to citizens and investing in programs like infrastructure, social welfare, or healthcare.<\/p>\n<p>Through trade-off analysis, policymakers can better navigate these choices to achieve balanced and sustainable outcomes.<\/p>\n<h2><strong>Capital Structure and Opportunity Cost<\/strong><\/h2>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-1862\" src=\"https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/01\/opportunity-cost-2.jpg\" alt=\"opportunity cost\" width=\"1200\" height=\"675\" srcset=\"https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/01\/opportunity-cost-2.jpg 1200w, https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/01\/opportunity-cost-2-300x169.jpg 300w, https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/01\/opportunity-cost-2-1024x576.jpg 1024w, https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/01\/opportunity-cost-2-768x432.jpg 768w, https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/01\/opportunity-cost-2-747x420.jpg 747w, https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/01\/opportunity-cost-2-150x84.jpg 150w, https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/01\/opportunity-cost-2-696x392.jpg 696w, https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/01\/opportunity-cost-2-1068x601.jpg 1068w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/><\/p>\n<p>Understanding the meaning of opportunity costs is crucial for business owners, especially when making decisions about their capital structure. Capital structure refers to a company&#8217;s balance of debt and equity to finance operations and growth, often documented in a <a href=\"https:\/\/www.hashmicro.com\/my\/blog\/special-journal\/\">special journal<\/a> for financial accuracy.<\/p>\n<p>By applying this formula, businesses can evaluate the trade-offs between alternative financing options, ensuring a strategic approach to economic decision-making.<\/p>\n<p>One of the key benefits of recognizing opportunity cost lies in its ability to guide businesses through trade-off analysis. For instance, determining whether to pay off existing debt, invest in launching a new product, or secure additional financing requires evaluating the potential returns of each choice.<\/p>\n<p>By incorporating opportunity cost into your decision-making process, you gain clarity on the value of saying &#8220;yes&#8221; or &#8220;no&#8221; to various options. This insight supports more informed economic decision-making and enhances your ability to manage risks effectively.<\/p>\n<p>Ultimately, understanding the opportunity cost meaning empowers business owners to optimize their capital structure while seizing opportunities that maximize growth and profitability.<\/p>\n<h2><strong>Opportunity Cost vs. Sunk Cost<\/strong><\/h2>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-1863\" src=\"https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/01\/opportunity-cost-3.jpg\" alt=\"opportunity cost\" width=\"1200\" height=\"675\" srcset=\"https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/01\/opportunity-cost-3.jpg 1200w, https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/01\/opportunity-cost-3-300x169.jpg 300w, https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/01\/opportunity-cost-3-1024x576.jpg 1024w, https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/01\/opportunity-cost-3-768x432.jpg 768w, https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/01\/opportunity-cost-3-747x420.jpg 747w, https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/01\/opportunity-cost-3-150x84.jpg 150w, https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/01\/opportunity-cost-3-696x392.jpg 696w, https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/01\/opportunity-cost-3-1068x601.jpg 1068w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/><\/p>\n<p>Sunk costs represent irretrievable past expenses and should not influence future economic decision-making. For instance, investing $1,000 in equipment to produce backpacks becomes a sunk cost once the money is spent.<\/p>\n<p>On the other hand, <a href=\"https:\/\/www.investopedia.com\/terms\/o\/opportunitycost.asp\" target=\"_blank\" rel=\"noopener\">opportunity cost<\/a> refers to the potential benefits or revenue lost when choosing one alternative over another. Using the same $1,000, you might instead invest in an ad campaign and gain 30 new customers, illustrating the trade-off analysis between choices.<\/p>\n<p>Understanding the meaning of opportunity cost is vital for informed decision-making. It emphasizes the potential gains from foregone alternatives and encourages managers to weigh all available options, assess trade-offs, and prioritize strategies that maximize returns.<\/p>\n<p>By effectively calculating opportunity costs, businesses can uncover hidden potential and make smarter financial choices. Click the banner below to explore HashMicro&#8217;s <a href=\"https:\/\/www.hashmicro.com\/my\/blog\/best-erp-software\/\">ERP Software<\/a> pricing tool and see how our software can help you maximize your returns!<\/p>\n<a href=\"https:\/\/www.hashmicro.com\/my\/offer\/download-erp-pricing-list?medium=banner-article\" target=\"_blank\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/08\/skema-harga-desktop-my.webp\" data-desktop-src=\"https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/08\/skema-harga-desktop-my.webp\" data-mobile-src=\"https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/08\/skema-harga-mobile-my.webp\" alt=\"SkemaHarga\" class=\"responsive-image-banner\"><\/a>\r\n\r\n<script>\r\n    \/\/ check which image to use based on screensize\r\n    document.addEventListener(\"DOMContentLoaded\", function() {\r\n        function updateImageSource() {\r\n            var images = document.querySelectorAll('.responsive-image-banner');\r\n            var screenWidth = window.innerWidth;\r\n\r\n            images.forEach(function(img) {\r\n                var mobileSrc = img.getAttribute('data-mobile-src');\r\n                var desktopSrc = img.getAttribute('data-desktop-src');\r\n\r\n                if (screenWidth < 576 && mobileSrc) {\r\n                    img.setAttribute('src', mobileSrc);\r\n                } else {\r\n                    img.setAttribute('src', desktopSrc);\r\n                }\r\n            });\r\n        }\r\n\r\n        \/\/ Initial check\r\n        updateImageSource();\r\n\r\n        \/\/ Update on resize\r\n        window.addEventListener('resize', updateImageSource);\r\n    });\r\n<\/script>\n<h2><strong>Opportunity Cost vs. Risk<\/strong><\/h2>\n<p>Risk in economic decision-making refers to the uncertainty in the actual outcome of a single choice compared to its projected performance. For instance, if Stock A was expected to sell for $8 per share but sold for $12 instead, the difference reflects the variability inherent in that decision.<\/p>\n<p>Opportunity cost, on the other hand, compares the potential gains of one choice against another alternative. Using the same example, if Stock A sold for $12 while Stock B sold for $15, the opportunity cost represents the forgone profit of $3 per share.<\/p>\n<p>While risk focuses on the variability within a single decision, opportunity cost emphasizes the relative benefits of competing alternatives. Combining trade-off analysis with an understanding of opportunity cost meaning allows businesses to prioritize options that align with their goals.<\/p>\n<h2><strong>How to Calculate Opportunity Cost<\/strong><\/h2>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-1864\" src=\"https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/01\/opportunity-cost-4.jpg\" alt=\"opportunity cost\" width=\"1200\" height=\"675\" srcset=\"https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/01\/opportunity-cost-4.jpg 1200w, https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/01\/opportunity-cost-4-300x169.jpg 300w, https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/01\/opportunity-cost-4-1024x576.jpg 1024w, https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/01\/opportunity-cost-4-768x432.jpg 768w, https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/01\/opportunity-cost-4-747x420.jpg 747w, https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/01\/opportunity-cost-4-150x84.jpg 150w, https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/01\/opportunity-cost-4-696x392.jpg 696w, https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/01\/opportunity-cost-4-1068x601.jpg 1068w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/><\/p>\n<p>Opportunity cost is a critical concept in economic decision-making. It enables individuals and businesses to weigh the benefits of various choices. The opportunity cost formula, <strong>Opportunity Cost = Benefit of Chosen Investment\u2014Benefit of Foregone Investment,<\/strong> helps quantify a decision&#8217;s potential gains or losses.<\/p>\n<p>This concept is invaluable for Malaysian businesses and investors when evaluating trade-offs, such as choosing between real estate in Kuala Lumpur or investing in local tech startups. Calculating opportunity cost can be approached in two ways: predicting potential returns before deciding or comparing actual returns afterward.<\/p>\n<p>Predicting returns allows for proactive trade-off analysis to optimize resource use, while post-decision evaluations offer insights into missed opportunities. For example, if Investment A yields 5% and Investment B, which was not chosen, delivers 9%, the cost is 4%, reflecting the foregone benefit.<\/p>\n<p>Opportunity cost extends beyond investments to everyday decisions. Whether choosing to start a small business in Johor Bahru or pursuing further education in Penang, understanding opportunity cost ensures decisions align with long-term goals and maximize potential benefits.<\/p>\n<h2><strong>Opportunity Cost Limits<\/strong><\/h2>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-1865\" src=\"https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/01\/opportunity-cost-5.jpg\" alt=\"opportunity cost\" width=\"1200\" height=\"675\" srcset=\"https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/01\/opportunity-cost-5.jpg 1200w, https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/01\/opportunity-cost-5-300x169.jpg 300w, https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/01\/opportunity-cost-5-1024x576.jpg 1024w, https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/01\/opportunity-cost-5-768x432.jpg 768w, https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/01\/opportunity-cost-5-747x420.jpg 747w, https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/01\/opportunity-cost-5-150x84.jpg 150w, https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/01\/opportunity-cost-5-696x392.jpg 696w, https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/01\/opportunity-cost-5-1068x601.jpg 1068w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/><\/p>\n<p>The challenge of calculating opportunity cost lies in the uncertainty of predicting future returns. While historical data provides insights into past performance, it cannot guarantee the outcomes of choices, making economic decision-making more complex.<\/p>\n<p>Opportunity cost meaning becomes more apparent in hindsight, as the actual performance of chosen and foregone investments can only be compared after making decisions. This limitation emphasizes the difficulty of accurately applying the formula in scenarios involving intangible factors like risk and liquidity.<\/p>\n<p>Liquidity becomes a significant aspect of opportunity cost in investments with differing time frames and risks. Opting for a short-term investment provides quicker access to funds, <span id=\"hashmicro-accounting-software\">while long-term investments offer higher returns but with less flexibility.<\/span><\/p>\n<h2><strong>Managing Opportunity Cost Effectiveness with the Implementation of the HashMicro Accounting System<\/strong><\/h2>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-1866\" src=\"https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/01\/opportunity-cost-6.jpg\" alt=\"opportunity cost\" width=\"1200\" height=\"675\" srcset=\"https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/01\/opportunity-cost-6.jpg 1200w, https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/01\/opportunity-cost-6-300x169.jpg 300w, https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/01\/opportunity-cost-6-1024x576.jpg 1024w, https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/01\/opportunity-cost-6-768x432.jpg 768w, https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/01\/opportunity-cost-6-747x420.jpg 747w, https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/01\/opportunity-cost-6-150x84.jpg 150w, https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/01\/opportunity-cost-6-696x392.jpg 696w, https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/01\/opportunity-cost-6-1068x601.jpg 1068w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/><\/p>\n<p>Calculating opportunity costs manually comes with several risks, one of which is errors in calculation, especially if there are many variables to consider. Humans are more prone to miscalculating relevant factors without automated tools or systems. This is why you must use an accounting system like <strong><a href=\"https:\/\/www.hashmicro.com\/my\/\">HashMicro<\/a><\/strong>.<\/p>\n<p>Try HashMicro\u2019s <a href=\"https:\/\/www.hashmicro.com\/my\/free-product-demo\/?medium=web-form-header\">free demo<\/a> today to see how it can simplify your opportunity cost analysis\u2014experience how automated tools can transform your decision-making process and enhance business efficiency.<\/p>\n<p><strong>Why We Recommend This Software: <a href=\"https:\/\/www.hashmicro.com\/my\/accounting-software\">HashMicro&#8217;s accounting system<\/a><\/strong> delivers accurate, real-time data that significantly improves cost calculations. With seamless access to financial statements and historical records, it enables businesses to make precise comparisons between investment options, ensuring more intelligent decisions.<\/p>\n<p>Here are the top features provided by HashMicro&#8217;s Accounting System:<\/p>\n<ul>\n<li><strong>Profit &amp; Loss vs Budget &amp; Forecast:<\/strong> This feature helps businesses compare actual financial results against budgeted goals, clarifying deviations. By identifying variances, managers can assess how alternative decisions could have impacted profitability.<\/li>\n<li><strong>Cashflow Reports:<\/strong> Cashflow reports offer a clear view of inflows and outflows, helping businesses understand liquidity at any moment. This allows managers to evaluate how different spending or investment decisions could affect cash reserves.<\/li>\n<li><strong>Forecast Budget:<\/strong> The forecast budget feature predicts financial outcomes based on historical data and current trends. It enables businesses to weigh alternative decisions&#8217; potential gains or losses before committing to them.<\/li>\n<li><strong>Financial Statement with Budget Comparison:<\/strong> This feature aligns actual financial performance with budgeted targets, highlighting variances for analysis. It helps businesses determine the opportunity costs of allocating funds to one area over another.<\/li>\n<li><strong>Multi-Level Analytical (Compare FS per project, branch, etc.):<\/strong> Multi-level analysis allows businesses to compare financial statements across different projects or branches. This helps us understand how resources could have been better allocated for higher returns.<\/li>\n<li><strong>Budget &amp; Realization:<\/strong> The budget and realization feature tracks how much of the budget has been spent and how much remains. It helps managers evaluate if reallocating funds to choices could yield better outcomes.<\/li>\n<li><strong>Complete FS with Period Comparison:<\/strong> This feature facilitates comparing financial performance across different time periods. It helps businesses assess how strategy changes could have improved results over time.<\/li>\n<li><strong>Equity Movement Report:<\/strong> The equity movement report tracks changes in equity, offering insights into the impact of financial decisions. It helps businesses analyze how alternative investments could have influenced equity growth.<\/li>\n<li><strong>Landed Costs Management:<\/strong> Landed cost management ensures all associated costs are factored into product pricing. This helps businesses evaluate if sourcing decisions align with maximizing profitability and minimizing opportunity costs.<\/li>\n<\/ul>\n<p>In addition, HashMicro facilitates the integration of various departments, such as finance, inventory, and human resources, enabling faster decision-making. Its automated system helps minimize the risk of manual calculation errors, making the opportunity cost analysis more precise and in-depth.<\/p>\n<h2><strong>Conclusions<\/strong><\/h2>\n<p>Opportunity cost refers to the potential benefits sacrificed when choosing one investment or business path over another. For Malaysian businesses, understanding this concept is vital to making informed decisions and simplifying trade-offs with the help of software solutions.<\/p>\n<p>HashMicro\u2019s <a href=\"https:\/\/www.hashmicro.com\/my\/accounting-software\">accounting software<\/a> offers accurate financial insights and real-time data, enabling businesses to evaluate alternatives and make precise decisions. Its integrated features help Malaysian companies maximize their potential by effectively accounting for every trade-off.<\/p>\n<p>Explore how HashMicro\u2019s accounting system can transform your decision-making process. Sign up for a <a href=\"https:\/\/www.hashmicro.com\/my\/free-product-demo\/?medium=web-form-header\">free demo<\/a> today to experience how this advanced software simplifies opportunity cost management and supports more intelligent business growth!<\/p>\n<a href=\"https:\/\/www.hashmicro.com\/my\/free-product-demo\/?medium=free-product-demo\" target=\"_blank\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/08\/free-demo-desktop-my.webp\" data-desktop-src=\"https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/08\/free-demo-desktop-my.webp\" data-mobile-src=\"https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2024\/07\/free-demo-mobile-my.jpg\" alt=\"FreeDemo\" class=\"responsive-image-banner\"><\/a>\r\n\r\n<script>\r\n    \/\/ check which image to use based on screensize\r\n    document.addEventListener(\"DOMContentLoaded\", function() {\r\n        function updateImageSource() {\r\n            var images = document.querySelectorAll('.responsive-image-banner');\r\n            var screenWidth = window.innerWidth;\r\n\r\n            images.forEach(function(img) {\r\n                var mobileSrc = img.getAttribute('data-mobile-src');\r\n                var desktopSrc = img.getAttribute('data-desktop-src');\r\n\r\n                if (screenWidth < 576 && mobileSrc) {\r\n                    img.setAttribute('src', mobileSrc);\r\n                } else {\r\n                    img.setAttribute('src', desktopSrc);\r\n                }\r\n            });\r\n        }\r\n\r\n        \/\/ Initial check\r\n        updateImageSource();\r\n\r\n        \/\/ Update on resize\r\n        window.addEventListener('resize', updateImageSource);\r\n    });\r\n<\/script>\n<h2><strong>FAQs about Opportunity Cost<\/strong><\/h2>\n<ul class=\"bottom_faq\">\n<li>\n<details>\n<summary><strong>What is opportunity cost and an example?<\/strong><\/summary>\n<p>Opportunity cost refers to the value of the next best alternative foregone when making a decision. For example, if a business invests in new machinery instead of launching a marketing campaign, the opportunity cost is the potential revenue the marketing campaign could have generated.<\/p>\n<\/details>\n<\/li>\n<li>\n<details>\n<summary><strong>Which best describes an opportunity cost?<\/strong><\/summary>\n<p>Opportunity cost is best described as the potential benefits or value lost when choosing one option over another. It represents the trade-off involved in every decision, whether in business, personal finance, or daily life.<\/p>\n<\/details>\n<\/li>\n<li>\n<details>\n<summary><strong>Why is it called opportunity cost?<\/strong><\/summary>\n<p>It is called &#8220;opportunity cost&#8221; because it reflects the cost of the opportunity that is given up. When a choice is made, the benefits of the alternative option are sacrificed, and this trade-off is what defines opportunity cost.<\/p>\n<\/details>\n<\/li>\n<\/ul>\n<p><script type=\"application\/ld+json\">\n{\n  \"@context\": \"https:\/\/schema.org\",\n  \"@type\": \"FAQPage\",\n  \"mainEntity\": [{\n    \"@type\": \"Question\",\n    \"name\": \"What is opportunity cost and an example?\",\n    \"acceptedAnswer\": {\n      \"@type\": \"Answer\",\n      \"text\": \"Opportunity cost refers to the value of the next best alternative foregone when making a decision. For example, if a business invests in new machinery instead of launching a marketing campaign, the opportunity cost is the potential revenue the marketing campaign could have generated.\"\n    }\n  },{\n    \"@type\": \"Question\",\n    \"name\": \"Which best describes an opportunity cost?\",\n    \"acceptedAnswer\": {\n      \"@type\": \"Answer\",\n      \"text\": \"Opportunity cost is best described as the potential benefits or value lost when choosing one option over another. It represents the trade-off involved in every decision, whether in business, personal finance, or daily life.\"\n    }\n  },{\n    \"@type\": \"Question\",\n    \"name\": \"Why is it called opportunity cost?\",\n    \"acceptedAnswer\": {\n      \"@type\": \"Answer\",\n      \"text\": \"It is called \\\"opportunity cost\\\" because it reflects the cost of the opportunity that is given up. When a choice is made, the benefits of the alternative option are sacrificed, and this trade-off is what defines opportunity cost.\"\n    }\n  }]\n}\n<\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Every business decision carries a hidden price\u2014the opportunity cost of what you give up to pursue another option. Understanding this concept is essential for managers aiming to optimize resources and make choices that align with their long-term goals. One of the managers&#8217; most prominent challenges is accurately identifying and calculating costs, especially when dealing with [&hellip;]<\/p>\n","protected":false},"author":6,"featured_media":1860,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[54],"tags":[146],"class_list":{"0":"post-1856","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-accounting","8":"tag-opportunity-cost"},"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.6 (Yoast SEO v26.6) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Opportunity Costs: Definition, Function, and How to Calculate<\/title>\n<meta name=\"description\" content=\"Opportunity cost is the profit or value lost when choosing one option over another, calculated as the difference between the chosen and next-best alternative.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.hashmicro.com\/my\/blog\/opportunity-cost\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Opportunity Costs: Definition, Function, and How to Calculate\" \/>\n<meta property=\"og:description\" content=\"Opportunity cost is the profit or value lost when choosing one option over another, calculated as the difference between the chosen and next-best alternative.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.hashmicro.com\/my\/blog\/opportunity-cost\/\" \/>\n<meta property=\"og:site_name\" content=\"HashMicro Malaysia\" \/>\n<meta property=\"article:published_time\" content=\"2025-01-10T04:00:41+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-12-19T02:55:29+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/01\/opportunity-cost.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"675\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Afresti Fahiratunnisa\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Afresti Fahiratunnisa\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"11 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.hashmicro.com\/my\/blog\/opportunity-cost\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.hashmicro.com\/my\/blog\/opportunity-cost\/\"},\"author\":{\"name\":\"Afresti Fahiratunnisa\",\"@id\":\"https:\/\/www.hashmicro.com\/my\/blog\/#\/schema\/person\/c68697bf42fbaa4eb8c4ade5f3b69a53\"},\"headline\":\"Opportunity Costs: Definition, Function, and How to Calculate\",\"datePublished\":\"2025-01-10T04:00:41+00:00\",\"dateModified\":\"2025-12-19T02:55:29+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.hashmicro.com\/my\/blog\/opportunity-cost\/\"},\"wordCount\":2105,\"publisher\":{\"@id\":\"https:\/\/www.hashmicro.com\/my\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.hashmicro.com\/my\/blog\/opportunity-cost\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/01\/opportunity-cost.jpg\",\"keywords\":[\"Opportunity Cost\"],\"articleSection\":[\"Accounting\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.hashmicro.com\/my\/blog\/opportunity-cost\/\",\"url\":\"https:\/\/www.hashmicro.com\/my\/blog\/opportunity-cost\/\",\"name\":\"Opportunity Costs: Definition, Function, and How to Calculate\",\"isPartOf\":{\"@id\":\"https:\/\/www.hashmicro.com\/my\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.hashmicro.com\/my\/blog\/opportunity-cost\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.hashmicro.com\/my\/blog\/opportunity-cost\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/01\/opportunity-cost.jpg\",\"datePublished\":\"2025-01-10T04:00:41+00:00\",\"dateModified\":\"2025-12-19T02:55:29+00:00\",\"description\":\"Opportunity cost is the profit or value lost when choosing one option over another, calculated as the difference between the chosen and next-best alternative.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.hashmicro.com\/my\/blog\/opportunity-cost\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.hashmicro.com\/my\/blog\/opportunity-cost\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.hashmicro.com\/my\/blog\/opportunity-cost\/#primaryimage\",\"url\":\"https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/01\/opportunity-cost.jpg\",\"contentUrl\":\"https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/01\/opportunity-cost.jpg\",\"width\":1200,\"height\":675,\"caption\":\"opportunity cost\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.hashmicro.com\/my\/blog\/opportunity-cost\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.hashmicro.com\/my\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Opportunity Costs: Definition, Function, and How to Calculate\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.hashmicro.com\/my\/blog\/#website\",\"url\":\"https:\/\/www.hashmicro.com\/my\/blog\/\",\"name\":\"HashMicro Malaysia\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/www.hashmicro.com\/my\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.hashmicro.com\/my\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.hashmicro.com\/my\/blog\/#organization\",\"name\":\"HashMicro Malaysia\",\"url\":\"https:\/\/www.hashmicro.com\/my\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.hashmicro.com\/my\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/09\/logo.webp\",\"contentUrl\":\"https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/09\/logo.webp\",\"width\":422,\"height\":255,\"caption\":\"HashMicro Malaysia\"},\"image\":{\"@id\":\"https:\/\/www.hashmicro.com\/my\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.hashmicro.com\/my\/blog\/#\/schema\/person\/c68697bf42fbaa4eb8c4ade5f3b69a53\",\"name\":\"Afresti Fahiratunnisa\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.hashmicro.com\/my\/blog\/#\/schema\/person\/image\/\",\"url\":\"http:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/11\/cropped-WhatsApp-Image-2024-07-31-at-14.16.47_e4fc5c69-scaled-1-96x96.jpg\",\"contentUrl\":\"http:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/11\/cropped-WhatsApp-Image-2024-07-31-at-14.16.47_e4fc5c69-scaled-1-96x96.jpg\",\"caption\":\"Afresti Fahiratunnisa\"},\"description\":\"A SEO content writer at HashMicro with a keen interest in savvy tech and a passion for exploring innovative digital strategies, dedicated to continuous learning and professional growth.\",\"url\":\"https:\/\/www.hashmicro.com\/my\/blog\/author\/afresti-fahiratunnisa\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Opportunity Costs: Definition, Function, and How to Calculate","description":"Opportunity cost is the profit or value lost when choosing one option over another, calculated as the difference between the chosen and next-best alternative.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.hashmicro.com\/my\/blog\/opportunity-cost\/","og_locale":"en_US","og_type":"article","og_title":"Opportunity Costs: Definition, Function, and How to Calculate","og_description":"Opportunity cost is the profit or value lost when choosing one option over another, calculated as the difference between the chosen and next-best alternative.","og_url":"https:\/\/www.hashmicro.com\/my\/blog\/opportunity-cost\/","og_site_name":"HashMicro Malaysia","article_published_time":"2025-01-10T04:00:41+00:00","article_modified_time":"2025-12-19T02:55:29+00:00","og_image":[{"width":1200,"height":675,"url":"https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/01\/opportunity-cost.jpg","type":"image\/jpeg"}],"author":"Afresti Fahiratunnisa","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Afresti Fahiratunnisa","Est. reading time":"11 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.hashmicro.com\/my\/blog\/opportunity-cost\/#article","isPartOf":{"@id":"https:\/\/www.hashmicro.com\/my\/blog\/opportunity-cost\/"},"author":{"name":"Afresti Fahiratunnisa","@id":"https:\/\/www.hashmicro.com\/my\/blog\/#\/schema\/person\/c68697bf42fbaa4eb8c4ade5f3b69a53"},"headline":"Opportunity Costs: Definition, Function, and How to Calculate","datePublished":"2025-01-10T04:00:41+00:00","dateModified":"2025-12-19T02:55:29+00:00","mainEntityOfPage":{"@id":"https:\/\/www.hashmicro.com\/my\/blog\/opportunity-cost\/"},"wordCount":2105,"publisher":{"@id":"https:\/\/www.hashmicro.com\/my\/blog\/#organization"},"image":{"@id":"https:\/\/www.hashmicro.com\/my\/blog\/opportunity-cost\/#primaryimage"},"thumbnailUrl":"https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/01\/opportunity-cost.jpg","keywords":["Opportunity Cost"],"articleSection":["Accounting"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.hashmicro.com\/my\/blog\/opportunity-cost\/","url":"https:\/\/www.hashmicro.com\/my\/blog\/opportunity-cost\/","name":"Opportunity Costs: Definition, Function, and How to Calculate","isPartOf":{"@id":"https:\/\/www.hashmicro.com\/my\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.hashmicro.com\/my\/blog\/opportunity-cost\/#primaryimage"},"image":{"@id":"https:\/\/www.hashmicro.com\/my\/blog\/opportunity-cost\/#primaryimage"},"thumbnailUrl":"https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/01\/opportunity-cost.jpg","datePublished":"2025-01-10T04:00:41+00:00","dateModified":"2025-12-19T02:55:29+00:00","description":"Opportunity cost is the profit or value lost when choosing one option over another, calculated as the difference between the chosen and next-best alternative.","breadcrumb":{"@id":"https:\/\/www.hashmicro.com\/my\/blog\/opportunity-cost\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.hashmicro.com\/my\/blog\/opportunity-cost\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.hashmicro.com\/my\/blog\/opportunity-cost\/#primaryimage","url":"https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/01\/opportunity-cost.jpg","contentUrl":"https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/01\/opportunity-cost.jpg","width":1200,"height":675,"caption":"opportunity cost"},{"@type":"BreadcrumbList","@id":"https:\/\/www.hashmicro.com\/my\/blog\/opportunity-cost\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.hashmicro.com\/my\/blog\/"},{"@type":"ListItem","position":2,"name":"Opportunity Costs: Definition, Function, and How to Calculate"}]},{"@type":"WebSite","@id":"https:\/\/www.hashmicro.com\/my\/blog\/#website","url":"https:\/\/www.hashmicro.com\/my\/blog\/","name":"HashMicro Malaysia","description":"","publisher":{"@id":"https:\/\/www.hashmicro.com\/my\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.hashmicro.com\/my\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.hashmicro.com\/my\/blog\/#organization","name":"HashMicro Malaysia","url":"https:\/\/www.hashmicro.com\/my\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.hashmicro.com\/my\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/09\/logo.webp","contentUrl":"https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/09\/logo.webp","width":422,"height":255,"caption":"HashMicro Malaysia"},"image":{"@id":"https:\/\/www.hashmicro.com\/my\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.hashmicro.com\/my\/blog\/#\/schema\/person\/c68697bf42fbaa4eb8c4ade5f3b69a53","name":"Afresti Fahiratunnisa","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.hashmicro.com\/my\/blog\/#\/schema\/person\/image\/","url":"http:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/11\/cropped-WhatsApp-Image-2024-07-31-at-14.16.47_e4fc5c69-scaled-1-96x96.jpg","contentUrl":"http:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/11\/cropped-WhatsApp-Image-2024-07-31-at-14.16.47_e4fc5c69-scaled-1-96x96.jpg","caption":"Afresti Fahiratunnisa"},"description":"A SEO content writer at HashMicro with a keen interest in savvy tech and a passion for exploring innovative digital strategies, dedicated to continuous learning and professional growth.","url":"https:\/\/www.hashmicro.com\/my\/blog\/author\/afresti-fahiratunnisa\/"}]}},"order_j":"","_links":{"self":[{"href":"https:\/\/www.hashmicro.com\/my\/blog\/wp-json\/wp\/v2\/posts\/1856","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hashmicro.com\/my\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hashmicro.com\/my\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hashmicro.com\/my\/blog\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hashmicro.com\/my\/blog\/wp-json\/wp\/v2\/comments?post=1856"}],"version-history":[{"count":15,"href":"https:\/\/www.hashmicro.com\/my\/blog\/wp-json\/wp\/v2\/posts\/1856\/revisions"}],"predecessor-version":[{"id":14356,"href":"https:\/\/www.hashmicro.com\/my\/blog\/wp-json\/wp\/v2\/posts\/1856\/revisions\/14356"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.hashmicro.com\/my\/blog\/wp-json\/wp\/v2\/media\/1860"}],"wp:attachment":[{"href":"https:\/\/www.hashmicro.com\/my\/blog\/wp-json\/wp\/v2\/media?parent=1856"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hashmicro.com\/my\/blog\/wp-json\/wp\/v2\/categories?post=1856"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hashmicro.com\/my\/blog\/wp-json\/wp\/v2\/tags?post=1856"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}