In the modern world, the systems getting smarter leads to a rapid increase in the usage of electricity, thereby increasing the load on the grids. The utilities are forced to meet the demand and are under stress during the peak hours due to the shortfall in power generation. The abovesaid deficit signifies the explicit need for a strategy that reduces the peak demand by rescheduling the load pattern, as well as reduces the stress on grids. Demand-side management (DSM) uses several algorithms for proper reallocation of loads, collectively known as demand response (DR). DR strategies effectively culminate in monetary benefits for customers and the utilities using dynamic pricing (DP) and incentive-based procedures. This study attempts to analyze the DP schemes of DR such as time-of-use (TOU) and real-time pricing (RTP) for different load scenarios in a smart grid (SG). Centralized and distributed algorithms are used to analyze the price-based DR problem using RTP. A techno-economic analysis was performed by using particle swarm optimization (PSO) and the strawberry (SBY) optimization algorithms used in handling the DP strategies with 109, 1992, and 7807 controllable industrial, commercial, and residential loads. A better optimization algorithm to go along with the pricing scheme to reduce the peak-to-average ratio (PAR) was identified. The results demonstrate that centralized RTP using the SBY optimization algorithm helped to achieve 14.80%, 21.7%, and 21.84% in cost reduction and outperformed the PSO.