Determining the optimal production quantity has been widely used by the classic economic production quantity (EPQ) model. However, the analysis for finding an EPQ model has many faults which led many researchers to make extensions in several aspects on the original EPQ model. The basic assumption of EPQ is that 100% of manufactured products are non-defective. This assumption is not valid for many production processes. In this paper a modified EPQ model has been developed. In this model, a portion of the defective items is considered to be scrap, rework and imperfect quality which are sold to a particular purchaser at a lower price. The wooden chipboard production process and high voltage transformers producing process give good examples for such situations. A mathematical model has been developed and for illustration of model a numerical examples are presented.