The concept of quality cost is defined by standard ISO9004. Optimization of quality costs is understood by the enterprises in different ways and always in a practical sense. There is possibility to consider optimization of quality cost as a distributive problem of optimum enterprise costs planning. Anality control cost and failure cost are interrelated and interdependent. Perfection of control processes can lead to a decrease in quality control expenses. Losses from failure cost can also be reduced due to the realization of relevant projects in manufacturing. The implementation of all similar projects demands additional expenses in manufacturing. There are expenses for preventive maintenance and failure costs. The limited resources of prevention cost can be distributed between failure costs and quality control cost. Optimum distribution of prevention cost is presented as a model of optimum planning and distribution of resources in manufacturing. A method for taking the optimum decision is presented.