A scheme is developed to study numerical solution of the time-fractional shock wave equation and wave equation under initial conditions by the homotopy perturbation method (HPM). The fractional derivatives are taken in the Caputo sense. The solutions are given in the form of series with easily computable terms. Numerical results are illustrated through the graph.