Electrons from heavy-flavour hadron decays (charm and beauty) were measured with the ALICE detector in Pb–Pb collisions at a centre-of-mass of energy sNN=2.76 TeV. The transverse momentum (pT) differential production yields at mid-rapidity were used to calculate the nuclear modification factor RAA in the interval 3<pT<18 GeV/c. The RAA shows a strong suppression compared to binary scaling of pp collisions at the same energy (up to a factor of 4) in the 10% most central Pb–Pb collisions. There is a centrality trend of suppression, and a weaker suppression (down to a factor of 2) in semi-peripheral (50–80%) collisions is observed. The suppression of electrons in this broad pT interval indicates that both charm and beauty quarks lose energy when they traverse the hot medium formed in Pb–Pb collisions at LHC.