The effects of Joule heating and viscous dissipation in the MHD flow of a viscoelastic (second-grade) fluid past a stretching sheet in the presence of metallic nanoparticles are studied. Copper nanoparticles are suspended in second-grade fluid with kerosene, water and polyvinly alcohol (PVA) that are supposed to be the base fluids. The mathematical equations that oversee the flow and heat transfer fields have been developed in the form of partial differential equations that are subsequently converted into a system of non-linear ordinary differential equations using the appropriate similarity transformation. The obtained equations are numerically solved and the impacts of different types of base fluids, solid volume fraction, magnetic number and Eckert number on the flow, temperature field, skin friction and Nusselt number are graphically analyzed. A sensitivity analysis is also utilized to identify the impact of involved parameters on skin friction and local Nusselt number. To predict the uncertainty caused by the involved parameters on skin friction and local Nusselt number, the Response Surface Methodology (RSM) is used. It is found that the volume fraction of nanoparticles does not cause uncertainty on skin friction, while the viscoelastic and magnetic number shows positive sensitivity at various levels. Also, Eckert number causes uncertainty on Nusselt number for lower values of the magnetic parameter.