In some processes and systems, undesirable inputs and outputs may be presented along with desirable measures. Undesirable factors play a significant role to calculate the accurate efficiency of Decision Making Units (DMUs). Furthermore, analyzing the impact of a throughput on another throughput in economics and production management gives useful information in order to make a better decision. Therefore, the current paper proposes a linear programming approach based on Data Envelopment Analysis (DEA) to compute the marginal rates of substitution for single throughput and multi-throughput of efficient DMUs while undesirable inputs and outputs are present simultaneously. To address undesirable input and output measures, the assumption of the weak disposability of both inputs and outputs is considered. The proposed approach is illustrated with numerical examples and an application of wastewater treatment plants. The results show that the provided approach is applicable and suitable to assess the marginal rates of substitution in the presence of undesirable input–output measures.