The effects of a protostellar outflow on the star formation in a single cloud core are investigated by three-dimensional resistive magnetohydrodynamic (MHD) simulations. Starting from the pre-stellar cloud core, the star formation process is calculated until the end of the main accretion phase. In the calculations, the mass of the pre-stellar cloud is parametrized. During the star formation, the protostellar outflow is driven by the circumstellar disc. The outflow extends also in the transverse direction until its width becomes comparable to the initial cloud scale, and thus the outflow has a wide opening angle of ≳40°. As a result, the protostellar outflow sweeps up a large fraction of the infalling material and ejects it into the interstellar space. The outflow can eject at most over half of the host cloud mass, significantly decreasing the star formation efficiency. The outflow power is stronger in clouds with a greater initial mass. Thus, the protostellar outflow effectively suppresses the star formation efficiency in a massive cloud. The outflow weakens significantly and disappears in several free-fall time-scales of the initial cloud after the cloud begins to collapse. The natal pre-stellar core influences the lifetime and size of the outflow. At the end of the main accretion phase, a massive circumstellar disc comparable in mass to the protostar remains. Calculations show that ∼26–54 per cent of the initial cloud mass is converted into the protostar and ∼8–40 per cent remains in the circumstellar disc, while ∼8–49 per cent can be ejected into the interstellar space by the protostellar outflow. Therefore, the protostellar outflow can decrease the star formation efficiency to ∼50 per cent at the maximum.