Objective: to investigate the cost efficiency of inventory management for publicly home appliance retail companies in the Brazilian market that operate, among other channels, with B2C (Business-to-Costumer) and discuss the possible impacts of ecommerce on inventory management. Method: the first step, construction of a descriptive summary of Magazine Luiza and seven other competitors; the second step, analysis of the optimal cost efficiency of companies' inventory management, through an integrated and dynamic model of Data Envelopment Analysis (DEA) and Optimal Control Theory (OCT). Amounts declared in the Quarterly Financial Statements between the fourth quarter of 2010 and the second quarter of 2018 were considered. Main Results: the discovery of best practices and the fact that, despite its extraordinary appreciation, Magazine Luiza was not a reference in inventory management and its costs during the analyzed period as a whole. Relevance/Originality: this article is an initial step to address the lack of studies on e-commerce for emerging markets and inventory management and its costs for ecommerce. Methodological Contributions: the proposition of a methodology that can be used by other researchers to assess the cost efficiency of inventory management and the impact of e-commerce, highlighting best practices.