This paper proposes a novel demand response (DR) mechanism based on real time electricity prices with the objective of cost reduction. The novelty of the proposed mechanism lies in the concept that electricity sub-prices are calculated based on the fraction of energy consumed by each unit/home. While, in traditional residential energy management programs, one DR signal applies to each associated unit without considering low, medium or high energy consumers. The proposed mechanism calculates the electricity prices for each individual unit based on which the electricity is calculated. Furthermore, the proposed mechanism is designed in such a way that it is equally feasible for all types of DR programs being used for demand side energy management. To assess the feasibility and practical applicability of the proposed mechanism, extensive simulations are conducted. The simulation results verify that the mechanism is efficient in calculating sub-prices without violating the utility constraint (i.e., the net cost remains same in both traditional and proposed mechanisms).