A microfluidic device comprising: at least one inlet for receiving a sample comprising target cells and non-target cells; a first spiral channel portion having an upstream end in a central region and a downstream end in a peripheral region, the upstream end being coupled to the inlet, the first spiral channel portion being configured such that the target cells and the non-target cells occupy different streams at the downstream end; a first waste outlet arranged to couple with streams of non-target cells at the downstream end of the first spiral channel portion; a link channel portion arranged to couple with streams of target cells at the downstream end of the first spiral channel portion; a second spiral channel portion having an upstream end in a peripheral region and a downstream end in a central region, the upstream end of the second spiral channel portion being coupled to the link channel portion, the second spiral channel portion being configured such that the target cells and the non-target cells occupy different streams at the downstream end; a second waste outlet arranged to couple with streams of non-target cells at the downstream end of the second spiral channel portion; a sample outlet arranged to couple with streams of target cells at the downstream end of the second spiral channel portion; a first waste outlet portion and a pressure compensator path forming part of the first waste outlet portion and coupling the downstream end of the first spiral channel portion to the first waste outlet; a sample outlet coupling path coupling the second spiral channel portion to the sample outlet; a second waste outlet coupling path coupling the second spiral channel portion to the second waste outlet; a first buffer inlet coupled to the upstream end of the first spiral channel portion, the first buffer inlet configured to receive a sheath buffer; and a second buffer inlet coupled to the upstream end of the second spiral channel portion, the second buffer inlet configured to receive a sheath buffer, characterised in that the first waste outlet portion is configured to have a flow resistance R W1 according to the equation: r O ′ = R W 1 − r O 1 R R 1 + R 2 / R C 2 + R 2 / / W 2 wherein r O1 is a flow rate ratio of recovery equal to a ratio of a flow rate Q SI2 through the link channel portion and a flow rate Q WO1 at the first waste outlet, r O ' is equal to the sum of r O1 and a ratio of an input flow rate Q BI2 of sheath buffer into the second buffer inlet and the flow rate Q WO1 at the first waste outlet, R R1+S2 is the flow resistance of the link channel portion, and R C2+R2//W2 is the flow resistance of the second spiral channel portion and the parallel combination of the sample outlet coupling path and the second waste outlet coupling path. at least one inlet for receiving a sample comprising target cells and non-target cells; a first spiral channel portion having an upstream end in a central region and a downstream end in a peripheral region, the upstream end being coupled to the inlet, the first spiral channel portion being configured such that the target cells and the non-target cells occupy different streams at the downstream end; a first waste outlet arranged to couple with streams of non-target cells at the downstream end of the first spiral channel portion; a link channel portion arranged to couple with streams of target cells at the downstream end of the first spiral channel portion; a second spiral channel portion having an upstream end in a peripheral region and a downstream end in a central region, the upstream end of the second spiral channel portion being coupled to the link channel portion, the second spiral channel portion being configured such that the target cells and the non-target cells occupy different streams at the downstream end; a second waste outlet arranged to couple with streams of non-target cells at the downstream end of the second spiral channel portion; a sample outlet arranged to couple with streams of target cells at the downstream end of the second spiral channel portion; a first waste outlet portion and a pressure compensator path forming part of the first waste outlet portion and coupling the downstream end of the first spiral channel portion to the first waste outlet; a sample outlet coupling path coupling the second spiral channel portion to the sample outlet; a second waste outlet coupling path coupling the second spiral channel portion to the second waste outlet; a first buffer inlet coupled to the upstream end of the first spiral channel portion, the first buffer inlet configured to receive a sheath buffer; and a second buffer inlet coupled to the upstream end of the second spiral channel portion, the second buffer inlet configured to receive a sheath buffer, characterised in that the first waste outlet portion is configured to have a flow resistance R W1 according to the equation: r O ′ = R W 1 − r O 1 R R 1 + R 2 / R C 2 + R 2 / / W 2 wherein r O1 is a flow rate ratio of recovery equal to a ratio of a flow rate Q SI2 through the link channel portion and a flow rate Q WO1 at the first waste outlet, r O ' is equal to the sum of r O1 and a ratio of an input flow rate Q BI2 of sheath buffer into the second buffer inlet and the flow rate Q WO1 at the first waste outlet, R R1+S2 is the flow resistance of the link channel portion, and R C2+R2//W2 is the flow resistance of the second spiral channel portion and the parallel combination of the sample outlet coupling path and the second waste outlet coupling path.