The differential production cross section of electrons from semileptonic heavy-flavor hadron decays has been measured at midrapidity (
y
below 0.5) in proton-proton collisions at sqrt(s)=7 TeV with ALICE at the LHC. Electrons were measured in the transverse momentum range pt above 0.5 GeV/c and below 8 GeV/c. Predictions from a fixed-order perturbative QCD calculation with next-to-leading-log resummation agree with the data within the theoretical and experimental uncertainties.