Cell stiffness is a sensitive indicator of physiological and pathological changes in cells, with many potential applications in biology and medicine. A new method, real-time deformability cytometry, probes cell stiffness at high throughput by exposing cells to a shear flow in a microfluidic channel, allowing for mechanical phenotyping based on single-cell deformability. However, observed deformations of cells in the channel not only are determined by cell stiffness, but also depend on cell size relative to channel size. Here, we disentangle mutual contributions of cell size and cell stiffness to cell deformation by a theoretical analysis in terms of hydrodynamics and linear elasticity theory. Performing real-time deformability cytometry experiments on both model spheres of known elasticity and biological cells, we demonstrate that our analytical model not only predicts deformed shapes inside the channel but also allows for quantification of cell mechanical parameters. Thereby, fast and quantitative mechanical sampling of large cell populations becomes feasible.