In decision management science, recognizing the inputs and outputs of an organization is very important to evaluate its performance. In particular, it becomes more important when costs are incurred for the organization's inputs. In this paper, we evaluate the cost efficiency of a set of decision-making units (DMUs) so that some of its indices can appear as flexibly in the input or output role. Since, if flexible indices are evident in the input index, then they play an important role in costs, it will be important to identify the performance of the units. However, in this paper, using data envelopment analysis (DEA) models, we determine the cost efficiency and productivity of a set of decision-making units with multiple inputs and multiple outputs in the presence of flexible indices. Finally, we present an example that shows the effect of the flexible index on cost efficiency, and also with an application example, we will determine the cost efficiency and productivity of 40 branches of the banks. The obtained result is compared with one of the other methods.