An air-conditioning apparatus comprising: a refrigerant circuit formed by connecting, with pipes, a compressor configured to compress heat-source-side refrigerant, a refrigerant flow switching device configured to switch a circulation path of the heat-source-side refrigerant, a heat-source-side heat exchanger configured to cause the heat-source-side refrigerant to exchange heat, an expansion device configured to regulate a pressure of the heat-source-side refrigerant, and a plurality of intermediate heat exchangers each configured to exchange heat between the heat-source-side refrigerant and a heat medium different from the heat-source-side refrigerant; a heat medium circuit formed by connecting, with pipes, a plurality of pumps configured to pressurize and circulate the heat medium subjected to heat exchange in the plurality of intermediate heat exchangers, a plurality of use-side heat exchangers each configured to exchange heat between the heat medium and air in an air-conditioned space, and a flow switching device configured to switch which of the heat medium subjected to heat exchange in the plurality of intermediate heat exchangers is to be allowed to flow into and out of each of the use-side heat exchangers; and wherein the air-conditioning apparatus causes the plurality of use-side heat exchangers to operate a heating only operation mode where all of the plurality of use-side heat exchangers in operation perform heating, a cooling only operation mode where all of the plurality of use-side heat exchangers in operation perform cooling, and a cooling and heating mixed operation mode where some of the plurality of use-side heat exchangers in operation perform heating and other of the plurality of use-side heat exchangers perform cooling, and wherein the air-conditioning apparatus comprises a controller which is configured to switch the flow switching device to perform distribution processing in the cooling only operation mode and the heating only operation mode, that determines which of the heat medium subjected to heat exchange in the plurality of intermediate heat exchangers is to be allowed to flow into and out of which of the use-side heat exchangers, in accordance with a capacity of each of the use-side heat exchangers, characterised in that the controller is further configured to perform processing that involves ranking the capacities of the corresponding use-side heat exchangers in descending order; distributing values of the capacities between or among intermediate heat exchangers, adding up the distributed values for each of the intermediate heat exchangers, and equalizing the resulting sums of the capacities between or among the intermediate heat exchangers; and controlling the switching performed by the flow switching device in accordance with the distribution. a refrigerant circuit formed by connecting, with pipes, a compressor configured to compress heat-source-side refrigerant, a refrigerant flow switching device configured to switch a circulation path of the heat-source-side refrigerant, a heat-source-side heat exchanger configured to cause the heat-source-side refrigerant to exchange heat, an expansion device configured to regulate a pressure of the heat-source-side refrigerant, and a plurality of intermediate heat exchangers each configured to exchange heat between the heat-source-side refrigerant and a heat medium different from the heat-source-side refrigerant; a heat medium circuit formed by connecting, with pipes, a plurality of pumps configured to pressurize and circulate the heat medium subjected to heat exchange in the plurality of intermediate heat exchangers, a plurality of use-side heat exchangers each configured to exchange heat between the heat medium and air in an air-conditioned space, and a flow switching device configured to switch which of the heat medium subjected to heat exchange in the plurality of intermediate heat exchangers is to be allowed to flow into and out of each of the use-side heat exchangers; and wherein the air-conditioning apparatus causes the plurality of use-side heat exchangers to operate a heating only operation mode where all of the plurality of use-side heat exchangers in operation perform heating, a cooling only operation mode where all of the plurality of use-side heat exchangers in operation perform cooling, and a cooling and heating mixed operation mode where some of the plurality of use-side heat exchangers in operation perform heating and other of the plurality of use-side heat exchangers perform cooling, and wherein the air-conditioning apparatus comprises a controller which is configured to switch the flow switching device to perform distribution processing in the cooling only operation mode and the heating only operation mode, that determines which of the heat medium subjected to heat exchange in the plurality of intermediate heat exchangers is to be allowed to flow into and out of which of the use-side heat exchangers, in accordance with a capacity of each of the use-side heat exchangers, characterised in that the controller is further configured to perform processing that involves ranking the capacities of the corresponding use-side heat exchangers in descending order; distributing values of the capacities between or among intermediate heat exchangers, adding up the distributed values for each of the intermediate heat exchangers, and equalizing the resulting sums of the capacities between or among the intermediate heat exchangers; and controlling the switching performed by the flow switching device in accordance with the distribution.