We review the Equation of State ( EoS ) approach to dark sector perturbations and apply it to f ( \mathcal { R } ) gravity models of dark energy . We show that the EoS approach is numerically stable and use it to set observational constraints on designer models . Within the EoS approach we build an analytical understanding of the dynamics of cosmological perturbations for the designer class of f ( \mathcal { R } ) gravity models , characterised by the parameter { B } _ { \scriptscriptstyle { \textrm { 0 } } } and the background equation of state of dark energy w . When we use the Planck cosmic microwave background temperature anisotropy , polarisation and lensing data as well as the baryonic acoustic oscillation data from SDSS and WiggleZ , we find { B } _ { \scriptscriptstyle { \textrm { 0 } } } < 0.006 ( 95 % C.L . ) for the designer models with w = -1 . Furthermore , we find { B } _ { \scriptscriptstyle { \textrm { 0 } } } < 0.0045 and |w + 1 | < 0.002 ( 95 % C.L . ) for the designer models with w \neq - 1 . Previous analyses found similar results for designer and Hu-Sawicki f ( \mathcal { R } ) gravity models using the Effective Field Theory ( EFT ) approach [ Raveri et al . , Phys . Rev . D 90 , 043513 ( 2014 ) ; Hu et al . , Mon . Not . R. Astron . Soc . 459 , 3880 ( 2016 ) ] ; therefore this hints for the fact that generic f ( \mathcal { R } ) models with w \neq - 1 can be tightly constrained by current cosmological data , complementary to solar system tests [ Brax et al . , Phys . Rev . D 78 , 104021 ( 2008 ) ; Faulkner et al . , Phys . Rev . D 76 , 063505 ( 2007 ) ] . When compared to a w CDM fluid with the same sound speed , we find that the equation of state for f ( \mathcal { R } ) models is better constrained to be close to -1 by about an order of magnitude , due to the strong dependence of the perturbations on w .