{"id":16897,"date":"2026-03-02T09:24:59","date_gmt":"2026-03-02T09:24:59","guid":{"rendered":"https:\/\/www.hashmicro.com\/my\/blog\/?p=16897"},"modified":"2026-03-02T09:40:43","modified_gmt":"2026-03-02T09:40:43","slug":"ending-inventory-guide","status":"publish","type":"post","link":"https:\/\/www.hashmicro.com\/my\/blog\/ending-inventory-guide\/","title":{"rendered":"Ending Inventory: Formula, Valuation Methods &#038; Complete Calculation Guide 2026"},"content":{"rendered":"\n<p>Every business that deals in <a href=\"https:\/\/emerhub.com\/malaysia\/types-of-business-entities-in-malaysia\/\" target=\"_blank\" rel=\"noopener\">physical goods<\/a>, whether a retail shop in Kuala Lumpur, a manufacturing plant in Penang, or an e-commerce seller shipping across Malaysia, faces a critical question at the end of every accounting period: how much inventory is actually left, and what is it worth?<\/p>\n<p>The answer to that question is what accountants and business owners call ending inventory, or closing stock. It is one of the most consequential figures on your balance sheet, directly shaping your reported profits, your tax liability, and the decisions you make about purchasing and production in the months ahead. Yet for many businesses, it remains poorly understood, inconsistently calculated, and frequently the source of costly errors.<\/p>\n<p>This comprehensive guide simplifies closing stock management for business owners and accountants through practical formulas and real-world examples. By mastering these valuation methods, you will transform ending inventory from a source of confusion into a powerful financial tool.<\/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\"><a href=\"#ending-inventory\">Understand the definition<\/a>, importance, formulas, and calculation methods for ending inventory to strengthen your business financial reporting.<\/li>\n<li aria-level=\"1\">Learn the <a href=\"#formula-ending\">step-by-step formula<\/a> and real RM-based examples for calculating ending inventory accurately.<\/li>\n<li aria-level=\"1\">Exploring <a href=\"#ending-formula\">ending inventory formula<\/a> such as FIFO, LIFO, WAC, and Specific Identification methods to find the right approach for your business.<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span data-sheets-root=\"1\"><!-- <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\/inventory-management-system?medium=moneysite-banner\" target=\"_blank\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2026\/02\/inventory_definisi_en.webp\" data-desktop-src=\"https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2026\/02\/inventory_definisi_en.webp\" data-mobile-src=\"https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2026\/02\/inventory_definisi_en_m.webp\" alt=\"Inventory_Definisi\" 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><\/span><\/p>\n<h2 id=\"what-is-ending-inventory-closing-stock\"><strong><span id=\"ending-inventory\">What Is Ending Inventory (Closing Stock)?<\/span><\/strong><\/h2>\n<p>Ending inventory (closing stock) refers to the monetary value of all goods that a business still holds in stock at the end of a specific accounting period (a week, a month, a quarter, or a financial year). It represents the unsold portion of everything the business had available for sale during that period, expressed in terms of cost rather than selling price.<\/p>\n<p>Ending inventory doesn&#8217;t measure units in isolation. It measures the cost assigned to those units, based on whichever inventory valuation method the business uses. Two companies with identical piles of products could legitimately report different ending inventory figures if they use different costing methods.<\/p>\n<p>The <a href=\"https:\/\/www.hashmicro.com\/my\/blog\/inventory-report\/\">closing stock<\/a> at the end of one accounting period automatically becomes the beginning inventory (opening stock) for the next period. This rolling relationship is why any error made in calculating ending inventory cascades forward, distorting future periods&#8217; financial statements as well.<\/p>\n<p>In accounting terms, ending inventory appears in two key places:<\/p>\n<ul>\n<li><strong>The Balance Sheet:<\/strong> It is listed as a current asset, reflecting the value of goods the business owns that can be converted to cash through sale.<\/li>\n<li><strong>The Income Statement:<\/strong> It is used in the cost of goods sold (COGS) calculation, which directly affects gross profit.<\/li>\n<\/ul>\n<p>Distinguishing between raw materials, work-in-progress (WIP), and finished goods is essential for manufacturers, whereas retailers primarily manage completed products. This guide focuses on finished goods inventory to provide the most practical value for the widest variety of business models.<\/p>\n<p>Effective <a href=\"https:\/\/www.hashmicro.com\/my\/blog\/inventory-control\/\" target=\"_blank\" rel=\"noopener\">inventory management <\/a>starts with a clear and consistent understanding of what ending inventory is and how it is determined.<\/p>\n<style>\r\n    #custom-quote {\r\n        background-color: #f0f0f0;\r\n        padding: 20px;\r\n        border-radius: 12px;\r\n        margin: 20px;\r\n        display: flex;\r\n        flex-direction: column;\r\n    }\r\n\r\n    #custom-quote .quote-body {\r\n        display: flex;\r\n        flex-direction: row;\r\n        align-items: flex-start;\r\n        gap: 15px;\r\n        font-size: 16px;\r\n        line-height: 1.5;\r\n        font-style: italic;\r\n    }\r\n\r\n    #custom-quote .quote-icon {\r\n        width: 40px;\r\n        height: 40px;\r\n        flex-shrink: 0;\r\n    }\r\n\r\n    #custom-quote .quote-author-wrapper {\r\n        margin-top: 15px;\r\n        align-self: flex-start;\r\n        margin-left: 55px; \r\n\t\tmargin-bottom: 0px;\r\n    }\r\n\r\n    #custom-quote em {\r\n        font-family: 'Roboto Serif', serif !important;\r\n        font-size: 12px;\r\n        font-weight: bold;\r\n        font-style: normal;\r\n    }\r\n\r\n    @media screen and (max-width: 768px) {\r\n        #custom-quote {\r\n            margin: 15px 0;\r\n            padding: 15px;\r\n        }\r\n        \r\n        #custom-quote .quote-body {\r\n            gap: 12px;\r\n        }\r\n\r\n        #custom-quote .quote-author-wrapper {\r\n            margin-left: 52px;\r\n        }\r\n    }\r\n\r\n    @media screen and (max-width: 480px) {\r\n        #custom-quote {\r\n            margin: 10px 0;\r\n            padding: 12px;\r\n        }\r\n\r\n        #custom-quote .quote-body {\r\n            font-size: 14px;\r\n            gap: 10px;\r\n        }\r\n\r\n        #custom-quote .quote-icon {\r\n            width: 32px;\r\n            height: 32px;\r\n        }\r\n\r\n        #custom-quote .quote-author-wrapper {\r\n            margin-top: 10px;\r\n            margin-left: 42px;\r\n        }\r\n    }\r\n<\/style>\r\n\r\n<div id=\"custom-quote\">\r\n    <div class=\"quote-body\">\r\n        <img decoding=\"async\" src=\"https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/12\/quote.webp\" alt=\"Quote Icon\" class=\"quote-icon\">\r\n        <div>\r\n            Effective ending inventory management is the difference between tied-up capital and unlocked profitability. Companies that reconcile closing stock accurately at period-end can reduce waste by up to 25% and improve cash flow significantly.        <\/div>\r\n    <\/div>\r\n    <p class=\"quote-author-wrapper\">\r\n        <em>- Angela Tan, Regional Manager<\/em>\r\n    <\/p>\r\n<\/div>\n<h2 id=\"why-ending-inventory-matters\"><strong>Why Ending Inventory Matters for Business<\/strong><\/h2>\n<p>Some business owners treat closing stock as a number to fill in before the accountant can file the tax return. In reality, ending inventory is one of the most strategically significant figures in financial reporting framework. Here is why it deserves serious attention.<\/p>\n<h3>1. Impact on Cost of Goods Sold (COGS) and Gross Profit<\/h3>\n<p>COGS is calculated as: <em>Beginning Inventory + Net Purchases \u2212 Ending Inventory<\/em>.<\/p>\n<p>Ending inventory is subtracted, this means that a higher ending inventory value lowers COGS, which in turn increases gross profit. Conversely, a lower ending inventory value raises COGS and compresses gross profit margins. Inaccurate closing stock figures materially misstate profitability, leading to incorrect tax assessments, misleading investor reports, and flawed management decisions.<\/p>\n<h3>2. Balance Sheet Accuracy<\/h3>\n<p>Inventory is typically the largest current asset on a product-based business&#8217;s balance sheet. An overstated ending inventory inflates total assets and makes the business appear more financially healthy. An understated ending inventory has the opposite effect, potentially triggering unnecessary concern from lenders or investors. Either way, the distortion undermines the reliability of your financial statements.<\/p>\n<h3>3. Cash Flow and Purchasing Decisions<\/h3>\n<p>Precise closing stock data enables smarter purchasing decisions by balancing slow-moving goods and potential stockouts. This information is essential for calculating reorder points and strengthening supplier negotiations to protect your working capital. Ultimately, accurate data improves your <a href=\"https:\/\/www.hashmicro.com\/my\/blog\/inventory-forecasting\/\">inventory planning models<\/a> to ensure you maintain optimal inventory levels for your customers.<\/p>\n<h3>4. Tax Implications<\/h3>\n<p>In Malaysia, businesses are generally required to report inventory values in compliance with Malaysian Financial Reporting Standards (MFRS 102 \u2014 Inventories). The choice of valuation method affects taxable income. Businesses need to be consistent in their approach and compliant with the applicable standards to avoid issues during tax assessments by the Inland Revenue Board (LHDN).<\/p>\n<h3>5. Operational Insights<\/h3>\n<p>Beyond the financial statements, tracking ending inventory over multiple periods reveals powerful operational trends: which products move quickly, which sit stagnant, and where shrinkage or damage is eating into profitability. This intelligence is invaluable for category managers, buyers, and supply chain teams.<\/p>\n<h2 id=\"ending-inventory-formula\"><strong><span id=\"formula-ending\">Ending Inventory Formula<\/span><\/strong><\/h2>\n<h3>The Basic Formula<\/h3>\n<p>The fundamental formula for calculating ending inventory is straightforward:<\/p>\n<div style=\"background: #f4f8ff; border-left: 4px solid #2563eb; padding: 18px 24px; border-radius: 6px; margin: 24px 0;\">\n<p style=\"margin: 0; font-size: 1.1em;\"><strong>Ending Inventory = Beginning Inventory + Net Purchases \u2212 Cost of Goods Sold (COGS)<\/strong><\/p>\n<\/div>\n<p>Let&#8217;s break down each component:<\/p>\n<ul>\n<li><strong>Beginning Inventory:<\/strong> The value of stock on hand at the start of the accounting period. This is always equal to the previous period&#8217;s ending inventory.<\/li>\n<li><strong>Net Purchases:<\/strong> The total cost of all new inventory purchased or manufactured during the period, net of any returns or purchase discounts. This includes freight-in and other directly attributable costs.<\/li>\n<li><strong>Cost of Goods Sold (COGS):<\/strong> The cost of all inventory that was sold during the period. This is determined differently depending on the valuation method used (FIFO, LIFO, WAC, etc.).<\/li>\n<\/ul>\n<p>This formula reflects a simple truth: whatever inventory you started with, plus whatever you added, minus whatever you sold, equals what you have left.<\/p>\n<p>An important nuance: this formula gives you the <em>book value<\/em> of ending inventory, which may differ from a physical count if there has been shrinkage, theft, damage, or recording errors. That is why physical counts and reconciliation are critical companions to any formula-based calculation.<\/p>\n<h3>Step-by-Step Calculation Example<\/h3>\n<p>Let&#8217;s walk through a practical example using realistic RM values for a Malaysian context. Imagine Kedai Elektrik Maju Sdn Bhd, a consumer electronics retailer in Shah Alam, calculating their ending inventory for the month of June 2026.<\/p>\n<p>Given information:<\/p>\n<ul>\n<li>Beginning Inventory (1 June 2026): RM 85,000<\/li>\n<li>Purchases during June: RM 120,000<\/li>\n<li>Purchase returns: RM 5,000<\/li>\n<li>Freight-in costs: RM 2,500<\/li>\n<li>Sales revenue during June: RM 160,000<\/li>\n<li>Gross profit margin: 30%<\/li>\n<\/ul>\n<p>Step 1: Calculate Net Purchases<\/p>\n<p>Net Purchases = Purchases \u2212 Purchase Returns + Freight-in<br \/>\nNet Purchases = RM 120,000 \u2212 RM 5,000 + RM 2,500 = RM 117,500<\/p>\n<p>Step 2: Calculate COGS<\/p>\n<p>If the gross profit margin is 30%, then COGS = 70% of sales revenue.<br \/>\nCOGS = RM 160,000 \u00d7 70% = RM 112,000<\/p>\n<p>Step 3: Apply the Ending Inventory Formula<\/p>\n<p>Ending Inventory = Beginning Inventory + Net Purchases \u2212 COGS<br \/>\nEnding Inventory = RM 85,000 + RM 117,500 \u2212 RM 112,000 = RM 90,500<\/p>\n<p>Interpretation: At the end of June 2026, Kedai Elektrik Maju Sdn Bhd has RM 90,500 worth of inventory remaining. This figure will appear as a current asset on the balance sheet and will become the beginning inventory for July 2026.<\/p>\n<p>Note that in practice, the COGS figure is typically derived from your inventory system or calculated using one of the valuation methods discussed in the next section \u2014 not estimated from the gross profit margin. The gross profit approach is useful when physical counting is not possible (e.g., after a fire or flood), but the valuation methods below are the standard approach for routine accounting.<\/p>\n<h2 id=\"ending-inventory-valuation-methods\"><strong><span id=\"ending-formula\">Ending Inventory Valuation Methods<\/span><\/strong><\/h2>\n<p>The method determines which costs are assigned to sold goods (COGS) and which are assigned to unsold goods (ending inventory). There are four methods are widely recognized and used in business accounting.<\/p>\n<h3>1. FIFO (First In, First Out)<\/h3>\n<p>Under the <a href=\"https:\/\/www.hashmicro.com\/ph\/blog\/what-is-fifo-method\/\">FIFO method<\/a>, the assumption is that the first units purchased are the first ones sold. The oldest costs flow into COGS first, while the most recently purchased (and typically most expensive) inventory remains in ending inventory.<\/p>\n<p>Example:<br \/>\nSuppose a company purchased inventory in two batches:<\/p>\n<ul>\n<li>Batch 1 (older): 100 units at RM 10 each = RM 1,000<\/li>\n<li>Batch 2 (newer): 100 units at RM 12 each = RM 1,200<\/li>\n<\/ul>\n<p>If 120 units were sold, FIFO assigns:<br \/>\nCOGS = (100 \u00d7 RM 10) + (20 \u00d7 RM 12) = RM 1,000 + RM 240 = RM 1,240<br \/>\nEnding Inventory = 80 units \u00d7 RM 12 = RM 960<\/p>\n<p>Advantages of FIFO:<\/p>\n<ul>\n<li>Ending inventory reflects current market prices (more relevant balance sheet value)<\/li>\n<li>Logical flow that matches actual physical goods movement in most businesses<\/li>\n<li>Accepted under both MFRS and IFRS<\/li>\n<\/ul>\n<p>Disadvantages:<\/p>\n<ul>\n<li>In periods of rising prices, FIFO produces lower COGS, higher profit, and therefore higher tax liability<\/li>\n<\/ul>\n<p>FIFO is the most commonly used method in Malaysia and is generally preferred for businesses dealing in perishable goods, food, pharmaceuticals, or any product where physical rotation matters.<\/p>\n<h3>2. LIFO (Last In, First Out)<\/h3>\n<p>Under the LIFO method, the most recently purchased inventory is assumed to be sold first. Newer, often higher costs flow into COGS, while the oldest (and often cheapest) costs remain in ending inventory.<\/p>\n<p>Example:<br \/>\nCOGS under LIFO = (100 \u00d7 RM 12) + (20 \u00d7 RM 10) = RM 1,200 + RM 200 = RM 1,400<br \/>\nEnding Inventory = 80 units \u00d7 RM 10 = RM 800<\/p>\n<p>Important caveat for Malaysian businesses: LIFO is not permitted under MFRS 102 (the Malaysian equivalent of IAS 2). It remains permissible under US GAAP but is explicitly prohibited under International Financial Reporting Standards. Malaysian businesses should therefore be aware of LIFO primarily for academic understanding or when dealing with US-based parent companies.<\/p>\n<h3>3. Weighted Average Cost (WAC)<\/h3>\n<p>The Weighted Average Cost method calculates a single average cost per unit across all inventory available during the period, then applies that average to both COGS and ending inventory.<\/p>\n<p>Formula:<br \/>\nWeighted Average Cost per Unit = Total Cost of Goods Available for Sale \u00f7 Total Units Available for Sale<\/p>\n<p>Example:<br \/>\nTotal cost = RM 1,000 + RM 1,200 = RM 2,200<br \/>\nTotal units = 200<br \/>\nWAC per unit = RM 2,200 \u00f7 200 = RM 11.00<br \/>\nCOGS (120 units) = 120 \u00d7 RM 11 = RM 1,320<br \/>\nEnding Inventory (80 units) = 80 \u00d7 RM 11 = RM 880<\/p>\n<p>Advantages of WAC:<\/p>\n<ul>\n<li>Smooths out price fluctuations, providing a stable and consistent valuation<\/li>\n<li>Simpler to apply than FIFO when inventory is highly interchangeable<\/li>\n<li>Accepted under MFRS 102<\/li>\n<\/ul>\n<p>Disadvantages:<\/p>\n<ul>\n<li>Ending inventory does not reflect current market prices as precisely as FIFO<\/li>\n<li>Must be recalculated whenever new purchases occur (under the moving weighted average variant used in perpetual systems)<\/li>\n<\/ul>\n<p>WAC is particularly popular in industries where it is impossible or impractical to distinguish between batches, such as bulk commodities, chemicals, or grain.<\/p>\n<h3>4. Specific Identification<\/h3>\n<p>The Specific Identification method tracks the actual cost of each individual item in inventory and assigns that exact cost to COGS when the item is sold.<\/p>\n<p>Advantages:<\/p>\n<ul>\n<li>Perfectly accurate \u2014 ending inventory reflects the true cost of items still on hand<\/li>\n<li>Ideal for high-value, unique, or serialized items (luxury cars, jewelry, bespoke machinery, real estate)<\/li>\n<\/ul>\n<p>Disadvantages:<\/p>\n<ul>\n<li>Impractical for businesses with large volumes of interchangeable, low-cost items<\/li>\n<li>Susceptible to manipulation, management could theoretically select which specific units to &#8220;sell&#8221; to influence profit figures<\/li>\n<\/ul>\n<p>For businesses managing <a href=\"https:\/\/www.hashmicro.com\/my\/blog\/consignment-inventory\/\">consignment stock<\/a>, specific identification is the most appropriate and legally straightforward method. This approach ensures each item&#8217;s ownership and cost basis are clearly documented. It maintains financial transparency when handling high-value goods held for others.<\/p>\n<p><strong>The table below summarizes the key differences across all four methods<\/strong>:<\/p>\n<table style=\"width: 100%; border-collapse: collapse; margin: 24px 0;\">\n<thead>\n<tr style=\"background: #2563eb; color: #fff;\">\n<th style=\"padding: 12px; text-align: left;\">Method<\/th>\n<th style=\"padding: 12px; text-align: left;\">COGS (Rising Prices)<\/th>\n<th style=\"padding: 12px; text-align: left;\">Ending Inventory (Rising Prices)<\/th>\n<th style=\"padding: 12px; text-align: left;\">MFRS Permitted?<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr style=\"background: #f9fafb;\">\n<td style=\"padding: 11px; border-bottom: 1px solid #e5e7eb;\">FIFO<\/td>\n<td style=\"padding: 11px; border-bottom: 1px solid #e5e7eb;\">Lower<\/td>\n<td style=\"padding: 11px; border-bottom: 1px solid #e5e7eb;\">Higher (closer to market)<\/td>\n<td style=\"padding: 11px; border-bottom: 1px solid #e5e7eb;\">\u2705 Yes<\/td>\n<\/tr>\n<tr>\n<td style=\"padding: 11px; border-bottom: 1px solid #e5e7eb;\">LIFO<\/td>\n<td style=\"padding: 11px; border-bottom: 1px solid #e5e7eb;\">Higher<\/td>\n<td style=\"padding: 11px; border-bottom: 1px solid #e5e7eb;\">Lower (may be outdated)<\/td>\n<td style=\"padding: 11px; border-bottom: 1px solid #e5e7eb;\">\u274c No<\/td>\n<\/tr>\n<tr style=\"background: #f9fafb;\">\n<td style=\"padding: 11px; border-bottom: 1px solid #e5e7eb;\">Weighted Average<\/td>\n<td style=\"padding: 11px; border-bottom: 1px solid #e5e7eb;\">Middle ground<\/td>\n<td style=\"padding: 11px; border-bottom: 1px solid #e5e7eb;\">Middle ground<\/td>\n<td style=\"padding: 11px; border-bottom: 1px solid #e5e7eb;\">\u2705 Yes<\/td>\n<\/tr>\n<tr>\n<td style=\"padding: 11px;\">Specific Identification<\/td>\n<td style=\"padding: 11px;\">Exact actual cost<\/td>\n<td style=\"padding: 11px;\">Exact actual cost<\/td>\n<td style=\"padding: 11px;\">\u2705 Yes<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 id=\"ending-inventory-implementation-steps\"><strong>Step-by-Step: Implementing an Ending Inventory Process<\/strong><\/h2>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-16906\" src=\"https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2026\/03\/Step-by-Step-Ending-Inventory.webp\" alt=\"Step-by-Step Ending Inventory\" width=\"1536\" height=\"1024\" srcset=\"https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2026\/03\/Step-by-Step-Ending-Inventory.webp 1536w, https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2026\/03\/Step-by-Step-Ending-Inventory-300x200.webp 300w, https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2026\/03\/Step-by-Step-Ending-Inventory-1024x683.webp 1024w, https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2026\/03\/Step-by-Step-Ending-Inventory-768x512.webp 768w, https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2026\/03\/Step-by-Step-Ending-Inventory-630x420.webp 630w, https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2026\/03\/Step-by-Step-Ending-Inventory-150x100.webp 150w, https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2026\/03\/Step-by-Step-Ending-Inventory-696x464.webp 696w, https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2026\/03\/Step-by-Step-Ending-Inventory-1068x712.webp 1068w\" sizes=\"(max-width: 1536px) 100vw, 1536px\" \/><\/p>\n<p>Knowing the formula is building a reliable, repeatable process to calculate ending inventory accurately every period is another. Here is a practical implementation framework that any business can follow.<\/p>\n<h3>Step 1: Establish Your Inventory Valuation Policy<\/h3>\n<p>Decide which costing method business will used and document it formally as part of accounting policies. Consult an accountant or auditor to choose a method based on your industry, inventory type, and accounting software capabilities. This choice must be applied consistently across periods, as switching methods requires formal disclosure and potential financial restatements.<\/p>\n<h3>Step 2: Set a Clear Stock Count Schedule<\/h3>\n<p>Determine how frequently you will count physical inventory. At a minimum, a full physical count should be conducted at the end of each financial year. Businesses with high turnover or high-value goods should conduct monthly or even weekly cycle counts to catch discrepancies before they accumulate.<\/p>\n<h3>Step 3: Organize Your Storage and Labelling System<\/h3>\n<p>Accurate ending inventory begins with organized physical storage. Every product should have a clear location code and label that corresponds to your inventory records. Goods should be arranged in a way that supports your chosen valuation method. Bin cards or location-based records help counters locate and verify items efficiently during stock counts.<\/p>\n<h3>Step 4: Conduct the Physical Stock Count<\/h3>\n<p>On the count date, pause all inbound and outbound stock movements where possible, or clearly demarcate goods received but not yet entered into the system. Use two-person counting teams to reduce human error. System count sheets should list expected quantities, but counters must record actual figures independently so that any discrepancies can be thoroughly investigated rather than simply overridden.<\/p>\n<h3>Step 5: Reconcile Physical Counts with System Records<\/h3>\n<p>After the count, compare physical results with your inventory management system and investigate variances above a defined materiality threshold. Common causes include unrecorded sales, supplier short-deliveries, internal theft, damaged goods not yet written off, or data entry errors. Adjust your records to reflect the physical reality, not the other way around.<\/p>\n<h3>Step 6: Apply Your Valuation Method<\/h3>\n<p>Once you have confirmed the physical quantities, apply your chosen costing method (FIFO, WAC, or Specific Identification) to assign a cost to the closing stock. Ensure that your cost data is complete and accurate before running the valuation. For example, in Malaysia, import duties and applicable taxes that form part of the cost to bring goods to their present location should be included in inventory cost under MFRS 102.<\/p>\n<h3>Step 7: Assess for Net Realizable Value (NRV)<\/h3>\n<p>Inventory must be recorded at the lower of its original cost or its net realizable value (NRV), which is the estimated selling price minus completion and selling costs. If items become obsolete, deteriorate, or market prices drop below cost, they must be written down to their NRV to reflect their true value. This write-down is recognized as an expense in the period it occurs.<\/p>\n<h3>Step 8: Record and Report<\/h3>\n<p>Posting the final inventory figure updates your balance sheet and income statement automatically through the COGS calculation. You should then generate management reports to ensure strategic oversight of your stock levels. Finally, archive all count sheets and reconciliation schedules to provide essential evidence for future audits.<\/p>\n<h2 id=\"common-mistakes\"><strong>Common Mistakes When Calculating Ending Inventory<\/strong><\/h2>\n<p>Even experienced finance teams make errors when calculating closing stock. These mistakes can have surprisingly large downstream consequences.<\/p>\n<h3>1. Relying Solely on System Records Without Physical Verification<\/h3>\n<p>Many businesses, particularly those using point-of-sale or ERP systems, assume that system-generated inventory figures are always accurate. In reality, system records drift from physical reality due to unrecorded breakages, mis-picks, theft, and data entry errors. Without periodic physical verification, ending inventory can be materially overstated, leading to understated COGS and inflated profits.<\/p>\n<h3>2. Inconsistent Application of Costing Methods<\/h3>\n<p>Switching between FIFO and WAC without formal documentation and disclosure violates the consistency principle of accounting. This can lead to earnings manipulation, intentional or otherwise, and will attract scrutiny from auditors and tax authorities. Stick to one method and apply it rigorously.<\/p>\n<h3>3. Failing to Include All Costs in Inventory Value<\/h3>\n<p>Purchase price is not the only cost component of inventory. Inventory cost should include all costs of purchase (including import duties, freight, and non-refundable taxes), costs of conversion (for manufacturers), and other costs incurred in bringing inventory to its present location and condition. Businesses that only record the supplier invoice price and ignoring freight charges or customs duties, systematically understate ending inventory.<\/p>\n<h3>4. Ignoring Goods in Transit<\/h3>\n<p>Goods that have been purchased but not yet physically received may still belong to your business depending on the agreed shipping terms (FOB shipping point vs. FOB destination). Failing to include in-transit goods in ending inventory when ownership has already transferred results in an understatement of closing stock and an overstatement of COGS.<\/p>\n<h3>5. Not Writing Down Obsolete or Slow-Moving Stock<\/h3>\n<p>Businesses often resist writing down inventory because it reduces profits. However, carrying obsolete, damaged, or slow-moving stock at its original cost overstates assets and defers a loss that has already economically occurred. Regular reviews of inventory ageing reports with identifying stock that has not moved in 90, 180, or 365 days are essential to maintaining an accurate and honest closing stock figure.<\/p>\n<h3>6. Cut-Off Errors<\/h3>\n<p>Cut-off errors occur when transactions, such as December sales shipped in January, are recorded in the wrong accounting period. These discrepancies distort ending inventory and COGS, requiring strict procedures to ensure financial accuracy. Precise timing is especially vital when overseeing <a href=\"https:\/\/www.hashmicro.com\/my\/blog\/vendor-managed-inventory\/\">vendor-managed stock<\/a> to align ownership and prevent reporting errors during high-volume periods.<\/p>\n<h2 id=\"tips-to-manage-ending-inventory\"><strong>How to Manage Ending Inventory Effectively for Business<\/strong><\/h2>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-16908\" src=\"https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2026\/03\/Ending-Inventory-scaled.webp\" alt=\"Tips managing Ending Inventory\" width=\"2560\" height=\"1280\" srcset=\"https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2026\/03\/Ending-Inventory-scaled.webp 2560w, https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2026\/03\/Ending-Inventory-300x150.webp 300w, https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2026\/03\/Ending-Inventory-1024x512.webp 1024w, https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2026\/03\/Ending-Inventory-768x384.webp 768w, https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2026\/03\/Ending-Inventory-1536x768.webp 1536w, https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2026\/03\/Ending-Inventory-2048x1024.webp 2048w, https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2026\/03\/Ending-Inventory-840x420.webp 840w, https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2026\/03\/Ending-Inventory-150x75.webp 150w, https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2026\/03\/Ending-Inventory-696x348.webp 696w, https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2026\/03\/Ending-Inventory-1068x534.webp 1068w, https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2026\/03\/Ending-Inventory-1920x960.webp 1920w\" sizes=\"(max-width: 2560px) 100vw, 2560px\" \/><\/p>\n<p>Knowing how to calculate ending inventory correctly is one thing. Managing it strategically is another. Here are the most effective practices.<\/p>\n<h3>Conduct Regular Cycle Counts<\/h3>\n<p>Rather than waiting for an annual full stocktake, cycle counting involves continuously counting a rotating subset of your inventory throughout the year. Each <a href=\"https:\/\/www.hashmicro.com\/blog\/understanding-how-stock-keeping-unit-work-and-how-businesses-use-them\/\">SKU (stock-keeping unit)<\/a> is counted multiple times per year according to a predetermined schedule, typically prioritizing high-value or fast-moving items.<\/p>\n<p>The benefits of cycle counting over annual full counts include:<\/p>\n<ul>\n<li>Earlier error detection: Discrepancies are found and corrected quickly, before they cascade through multiple periods<\/li>\n<li>Reduced disruption: Operations do not need to halt for a full-warehouse shutdown<\/li>\n<li>More reliable ending inventory figures: Because records are continuously verified, the closing stock value at any given period-end is far more accurate<\/li>\n<li>Better shrinkage tracking: Patterns of loss become visible faster<\/li>\n<\/ul>\n<p>A practical cycle counting schedule might classify inventory into three tiers, such as A (highest value, counted monthly), B (moderate value, counted quarterly), and C (low value, counted semi-annually) in line with ABC analysis principles.<\/p>\n<h3>Use a Perpetual Inventory System<\/h3>\n<p>There are two fundamental approaches to tracking inventory: the periodic system and the perpetual system.<\/p>\n<p>Under a periodic system, inventory records are only updated at fixed intervals (monthly, quarterly, or annually). Between counts, you have no real-time visibility into stock levels. This works for very small businesses with limited SKUs but becomes increasingly inadequate as operations grow.<\/p>\n<p>Under a perpetual system, every inventory transaction, like purchase, sale, return, and adjustment is recorded in real time. At any moment, the system knows exactly how many units of each SKU are theoretically in stock and what their combined value is. This means you can generate an accurate ending inventory figure at any point in time, not just at period-end.<\/p>\n<p>The advantages of perpetual tracking for ending inventory accuracy are significant:<\/p>\n<ul>\n<li>COGS is calculated transaction by transaction, reducing the risk of cumulative errors<\/li>\n<li>Management can spot discrepancies between system records and physical counts much more quickly<\/li>\n<li>Reorder points and safety stock levels can be dynamically managed based on real-time stock positions<\/li>\n<li>Financial reporting is faster and more reliable at period-end<\/li>\n<\/ul>\n<p>Modern barcode scanning, RFID tagging, and integrated point-of-sale systems all support perpetual inventory tracking, making it accessible even for mid-sized Malaysian businesses.<\/p>\n<h3>Automate with Inventory Management Software<\/h3>\n<p>For businesses managing more than a handful of SKUs, manual tracking, such as notebooks or spreadsheets is a recipe for ending inventory errors. The single most impactful operational change a growing business can make is to implement dedicated <a href=\"https:\/\/www.hashmicro.com\/my\/blog\/best-inventory-management-software\/\" target=\"_blank\" rel=\"noopener\">inventory system<\/a> that automates the tracking, valuation, and reporting of closing stock.<\/p>\n<p>A capable inventory management system should:<\/p>\n<ul>\n<li>Automatically update stock levels with every purchase order received, sales order fulfilled, or return processed<\/li>\n<li>Support multiple valuation methods (FIFO, WAC, specific identification) and apply them consistently<\/li>\n<li>Generate period-end reports including ending inventory value, COGS summary, and stock movement analysis<\/li>\n<li>Integrate with your accounting and ERP systems to ensure financial statements reflect real-time inventory data<\/li>\n<li>Flag discrepancies between system records and physical counts during stocktake reconciliation<\/li>\n<li>Provide low-stock alerts and reorder suggestions to prevent stockouts that disrupt future periods<\/li>\n<\/ul>\n<p>Inventory management module is designed to handle all of these functions within a unified platform, making it particularly well-suited to businesses operation across multiple locations or sales channels. With automated costing and real-time stock visibility, the effort required to produce an accurate ending inventory figure at period-end is drastically reduced.<\/p>\n<p>Beyond calculation accuracy, software automation also reduces the workload on your finance and operations teams, freeing them to focus on analysis and strategy rather than data entry and reconciliation. For businesses looking to scale, this operational leverage is often just as valuable as the accuracy gains themselves.<\/p>\n<p>It is also worth noting that good inventory software integrates naturally with broader supply chain management. When your ending inventory data feeds directly into procurement planning and supplier communications, you create a virtuous cycle: accurate closing stock informs smarter purchasing, which leads to better-managed inventory, which produces more accurate closing stock figures in the next period.<\/p>\n<h2 id=\"conclusion\"><strong>Conclusion<\/strong><\/h2>\n<p>Accurate ending inventory is a foundational metric that directly impacts your balance sheet, tax position, and operational efficiency. Mastering the ending inventory formula requires a combination of rigorous data quality, regular physical counts, and the right valuation method. By leveraging technology to automate tracking, you can transform this calculation into a powerful tool for smarter purchasing and financial growth.<\/p>\n<p>Whether reconciling closing stock for the first time or refining an established process, this guide provides every necessary insight to manage ending inventory with confidence and precision. By starting with the formula, selecting an appropriate method, and prioritizing data quality, businesses can leverage the right tools to handle the operational load. The result is significantly improved financial statements and more informed strategic decisions.<\/p>\n<h2><strong>FAQ about Ending Inventory (Closing Stock)<\/strong><\/h2>\n<ul class=\"bottom_faq\">\n<li>\n<details>\n<summary><strong>Why\u00a0is\u00a0ending\u00a0inventory\u00a0important\u00a0for\u00a0businesses?<\/strong><\/summary>\n<p>Ending inventory is crucial for businesses as it impacts financial statements, particularly the balance sheet and income statement. It helps determine the cost of goods sold, affects profit calculations, and provides insights into inventory management and purchasing decisions.<\/p>\n<\/details>\n<\/li>\n<li>\n<details>\n<summary><strong>How\u00a0is\u00a0ending\u00a0inventory\u00a0calculated?<\/strong><\/summary>\n<p>Ending inventory can be calculated using various methods, including the FIFO (First In, First Out), LIFO (Last In, First Out), or weighted average cost method. The chosen method affects the valuation of inventory and the financial results reported.<\/p>\n<\/details>\n<\/li>\n<li>\n<details>\n<summary><strong>How\u00a0can\u00a0inventory\u00a0management\u00a0affect\u00a0ending\u00a0inventory?<\/strong><\/summary>\n<p>Effective inventory management can significantly impact ending inventory by ensuring that stock levels are optimized to meet customer demand without overstocking. This can reduce holding costs and minimize losses from unsold goods, ultimately improving a company&#8217;s financial performance.<\/p>\n<\/details>\n<\/li>\n<li>\n<details>\n<summary><strong>How\u00a0does\u00a0ending\u00a0inventory\u00a0affect\u00a0taxes?<\/strong><\/summary>\n<p>Ending inventory affects taxes because it influences the cost of goods sold, which in turn affects taxable income. A higher ending inventory can lead to lower cost of goods sold and higher taxable income, while a lower ending inventory can have the opposite effect.<\/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\": \"Why\u00a0is\u00a0ending\u00a0inventory\u00a0important\u00a0for\u00a0businesses?\",\n    \"acceptedAnswer\": {\n      \"@type\": \"Answer\",\n      \"text\": \"Ending inventory is crucial for businesses as it impacts financial statements, particularly the balance sheet and income statement. It helps determine the cost of goods sold, affects profit calculations, and provides insights into inventory management and purchasing decisions.\"\n    }\n  },{\n    \"@type\": \"Question\",\n    \"name\": \"How\u00a0is\u00a0ending\u00a0inventory\u00a0calculated?\",\n    \"acceptedAnswer\": {\n      \"@type\": \"Answer\",\n      \"text\": \"Ending inventory can be calculated using various methods, including the FIFO (First In, First Out), LIFO (Last In, First Out), or weighted average cost method. The chosen method affects the valuation of inventory and the financial results reported.\"\n    }\n  },{\n    \"@type\": \"Question\",\n    \"name\": \"How\u00a0can\u00a0inventory\u00a0management\u00a0affect\u00a0ending\u00a0inventory?\",\n    \"acceptedAnswer\": {\n      \"@type\": \"Answer\",\n      \"text\": \"Effective inventory management can significantly impact ending inventory by ensuring that stock levels are optimized to meet customer demand without overstocking. This can reduce holding costs and minimize losses from unsold goods, ultimately improving a company's financial performance.\"\n    }\n  },{\n    \"@type\": \"Question\",\n    \"name\": \"How\u00a0does\u00a0ending\u00a0inventory\u00a0affect\u00a0taxes?\",\n    \"acceptedAnswer\": {\n      \"@type\": \"Answer\",\n      \"text\": \"Ending inventory affects taxes because it influences the cost of goods sold, which in turn affects taxable income. A higher ending inventory can lead to lower cost of goods sold and higher taxable income, while a lower ending inventory can have the opposite effect.\"\n    }\n  }]\n}\n<\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Every business that deals in physical goods, whether a retail shop in Kuala Lumpur, a manufacturing plant in Penang, or an e-commerce seller shipping across Malaysia, faces a critical question at the end of every accounting period: how much inventory is actually left, and what is it worth? The answer to that question is what [&hellip;]<\/p>\n","protected":false},"author":44,"featured_media":16909,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[66],"tags":[],"class_list":{"0":"post-16897","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-inventory"},"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>Ending Inventory Optimization Guide for Business Efficiency<\/title>\n<meta name=\"description\" content=\"Optimize business efficiency and boost profitability with ending inventory management tips and valuation strategies.\" \/>\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\/ending-inventory-guide\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Ending Inventory: Formula, Valuation Methods &amp; Complete Calculation Guide 2026\" \/>\n<meta property=\"og:description\" content=\"Optimize business efficiency and boost profitability with ending inventory management tips and valuation strategies.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.hashmicro.com\/my\/blog\/ending-inventory-guide\/\" \/>\n<meta property=\"og:site_name\" content=\"HashMicro Malaysia\" \/>\n<meta property=\"article:published_time\" content=\"2026-03-02T09:24:59+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-03-02T09:40:43+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2026\/03\/Ending-Inventory-Closing-Stock-scaled.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"2560\" \/>\n\t<meta property=\"og:image:height\" content=\"1280\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"Nurul Ain\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Nurul Ain\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"18 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\/ending-inventory-guide\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.hashmicro.com\/my\/blog\/ending-inventory-guide\/\"},\"author\":{\"name\":\"Nurul Ain\",\"@id\":\"https:\/\/www.hashmicro.com\/my\/blog\/#\/schema\/person\/d9f06e18a636ec61b2a0351cd68b7be4\"},\"headline\":\"Ending Inventory: Formula, Valuation Methods &#038; Complete Calculation Guide 2026\",\"datePublished\":\"2026-03-02T09:24:59+00:00\",\"dateModified\":\"2026-03-02T09:40:43+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.hashmicro.com\/my\/blog\/ending-inventory-guide\/\"},\"wordCount\":3786,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.hashmicro.com\/my\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.hashmicro.com\/my\/blog\/ending-inventory-guide\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2026\/03\/Ending-Inventory-Closing-Stock-scaled.webp\",\"articleSection\":[\"Inventory\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.hashmicro.com\/my\/blog\/ending-inventory-guide\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.hashmicro.com\/my\/blog\/ending-inventory-guide\/\",\"url\":\"https:\/\/www.hashmicro.com\/my\/blog\/ending-inventory-guide\/\",\"name\":\"Ending Inventory Optimization Guide for Business Efficiency\",\"isPartOf\":{\"@id\":\"https:\/\/www.hashmicro.com\/my\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.hashmicro.com\/my\/blog\/ending-inventory-guide\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.hashmicro.com\/my\/blog\/ending-inventory-guide\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2026\/03\/Ending-Inventory-Closing-Stock-scaled.webp\",\"datePublished\":\"2026-03-02T09:24:59+00:00\",\"dateModified\":\"2026-03-02T09:40:43+00:00\",\"description\":\"Optimize business efficiency and boost profitability with ending inventory management tips and valuation strategies.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.hashmicro.com\/my\/blog\/ending-inventory-guide\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.hashmicro.com\/my\/blog\/ending-inventory-guide\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.hashmicro.com\/my\/blog\/ending-inventory-guide\/#primaryimage\",\"url\":\"https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2026\/03\/Ending-Inventory-Closing-Stock-scaled.webp\",\"contentUrl\":\"https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2026\/03\/Ending-Inventory-Closing-Stock-scaled.webp\",\"width\":2560,\"height\":1280,\"caption\":\"Ending Inventory (Closing Stock)\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.hashmicro.com\/my\/blog\/ending-inventory-guide\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.hashmicro.com\/my\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Ending Inventory: Formula, Valuation Methods &#038; Complete Calculation Guide 2026\"}]},{\"@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\/d9f06e18a636ec61b2a0351cd68b7be4\",\"name\":\"Nurul Ain\",\"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\/10\/cropped-Nurul-Ain-MY-BG-Toko-1080x1080-1-96x96.webp\",\"contentUrl\":\"http:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/10\/cropped-Nurul-Ain-MY-BG-Toko-1080x1080-1-96x96.webp\",\"caption\":\"Nurul Ain\"},\"description\":\"Nurul Ain focuses on inventory management, crafting articles that cover stock control, demand forecasting, and warehouse efficiency. She provides actionable tips for reducing inventory costs and avoiding stockouts. Her content supports both small and large businesses in optimizing their inventory practices.\",\"url\":\"https:\/\/www.hashmicro.com\/my\/blog\/author\/nurul-ain\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Ending Inventory Optimization Guide for Business Efficiency","description":"Optimize business efficiency and boost profitability with ending inventory management tips and valuation strategies.","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\/ending-inventory-guide\/","og_locale":"en_US","og_type":"article","og_title":"Ending Inventory: Formula, Valuation Methods & Complete Calculation Guide 2026","og_description":"Optimize business efficiency and boost profitability with ending inventory management tips and valuation strategies.","og_url":"https:\/\/www.hashmicro.com\/my\/blog\/ending-inventory-guide\/","og_site_name":"HashMicro Malaysia","article_published_time":"2026-03-02T09:24:59+00:00","article_modified_time":"2026-03-02T09:40:43+00:00","og_image":[{"width":2560,"height":1280,"url":"https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2026\/03\/Ending-Inventory-Closing-Stock-scaled.webp","type":"image\/webp"}],"author":"Nurul Ain","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Nurul Ain","Est. reading time":"18 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.hashmicro.com\/my\/blog\/ending-inventory-guide\/#article","isPartOf":{"@id":"https:\/\/www.hashmicro.com\/my\/blog\/ending-inventory-guide\/"},"author":{"name":"Nurul Ain","@id":"https:\/\/www.hashmicro.com\/my\/blog\/#\/schema\/person\/d9f06e18a636ec61b2a0351cd68b7be4"},"headline":"Ending Inventory: Formula, Valuation Methods &#038; Complete Calculation Guide 2026","datePublished":"2026-03-02T09:24:59+00:00","dateModified":"2026-03-02T09:40:43+00:00","mainEntityOfPage":{"@id":"https:\/\/www.hashmicro.com\/my\/blog\/ending-inventory-guide\/"},"wordCount":3786,"commentCount":0,"publisher":{"@id":"https:\/\/www.hashmicro.com\/my\/blog\/#organization"},"image":{"@id":"https:\/\/www.hashmicro.com\/my\/blog\/ending-inventory-guide\/#primaryimage"},"thumbnailUrl":"https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2026\/03\/Ending-Inventory-Closing-Stock-scaled.webp","articleSection":["Inventory"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.hashmicro.com\/my\/blog\/ending-inventory-guide\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.hashmicro.com\/my\/blog\/ending-inventory-guide\/","url":"https:\/\/www.hashmicro.com\/my\/blog\/ending-inventory-guide\/","name":"Ending Inventory Optimization Guide for Business Efficiency","isPartOf":{"@id":"https:\/\/www.hashmicro.com\/my\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.hashmicro.com\/my\/blog\/ending-inventory-guide\/#primaryimage"},"image":{"@id":"https:\/\/www.hashmicro.com\/my\/blog\/ending-inventory-guide\/#primaryimage"},"thumbnailUrl":"https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2026\/03\/Ending-Inventory-Closing-Stock-scaled.webp","datePublished":"2026-03-02T09:24:59+00:00","dateModified":"2026-03-02T09:40:43+00:00","description":"Optimize business efficiency and boost profitability with ending inventory management tips and valuation strategies.","breadcrumb":{"@id":"https:\/\/www.hashmicro.com\/my\/blog\/ending-inventory-guide\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.hashmicro.com\/my\/blog\/ending-inventory-guide\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.hashmicro.com\/my\/blog\/ending-inventory-guide\/#primaryimage","url":"https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2026\/03\/Ending-Inventory-Closing-Stock-scaled.webp","contentUrl":"https:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2026\/03\/Ending-Inventory-Closing-Stock-scaled.webp","width":2560,"height":1280,"caption":"Ending Inventory (Closing Stock)"},{"@type":"BreadcrumbList","@id":"https:\/\/www.hashmicro.com\/my\/blog\/ending-inventory-guide\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.hashmicro.com\/my\/blog\/"},{"@type":"ListItem","position":2,"name":"Ending Inventory: Formula, Valuation Methods &#038; Complete Calculation Guide 2026"}]},{"@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\/d9f06e18a636ec61b2a0351cd68b7be4","name":"Nurul Ain","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\/10\/cropped-Nurul-Ain-MY-BG-Toko-1080x1080-1-96x96.webp","contentUrl":"http:\/\/www.hashmicro.com\/my\/blog\/wp-content\/uploads\/2025\/10\/cropped-Nurul-Ain-MY-BG-Toko-1080x1080-1-96x96.webp","caption":"Nurul Ain"},"description":"Nurul Ain focuses on inventory management, crafting articles that cover stock control, demand forecasting, and warehouse efficiency. She provides actionable tips for reducing inventory costs and avoiding stockouts. Her content supports both small and large businesses in optimizing their inventory practices.","url":"https:\/\/www.hashmicro.com\/my\/blog\/author\/nurul-ain\/"}]}},"order_j":"","_links":{"self":[{"href":"https:\/\/www.hashmicro.com\/my\/blog\/wp-json\/wp\/v2\/posts\/16897","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\/44"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hashmicro.com\/my\/blog\/wp-json\/wp\/v2\/comments?post=16897"}],"version-history":[{"count":3,"href":"https:\/\/www.hashmicro.com\/my\/blog\/wp-json\/wp\/v2\/posts\/16897\/revisions"}],"predecessor-version":[{"id":16902,"href":"https:\/\/www.hashmicro.com\/my\/blog\/wp-json\/wp\/v2\/posts\/16897\/revisions\/16902"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.hashmicro.com\/my\/blog\/wp-json\/wp\/v2\/media\/16909"}],"wp:attachment":[{"href":"https:\/\/www.hashmicro.com\/my\/blog\/wp-json\/wp\/v2\/media?parent=16897"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hashmicro.com\/my\/blog\/wp-json\/wp\/v2\/categories?post=16897"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hashmicro.com\/my\/blog\/wp-json\/wp\/v2\/tags?post=16897"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}