I will present the latest numerical results on the evolution of low-mass stars and brown dwarfs in the protostellar and pre-main-sequence phases taking realistic accretion histories onto the protostar into account. I will show how the thermal efficiency of accretion (fraction of accretion energy absorbed by the protostar) can influence the position of the pre-main-sequence objects on the HR diagram. The role of episodic accretion bursts for the evolution of low-mass stars will be specifically addressed.