Machined surface topography is very critical since it directly affects the surface quality, especially the surface roughness. Based on the trajectory equations of the cutting edge relative to the workpiece, a new method is developed for the prediction of machined surface topography. This method has the advantage of simplicity and is a mesh-independent direct computing method over the traditional interpolation scheme. It is unnecessary to discretize the cutting edge or to mesh the workpiece. The topography value of any point on the machined surface can be calculated directly, and the spindle runout can be taken into account. The simulation of machined surface topography is successfully carried out for both end and ball-end milling processes. In the end milling process, a fast convergence of solving the trajectory equation system by the Newton-Raphson method can be ensured for topography simulation at any node on the machined surface thanks to the appropriate choice of the starting point. In the ball-end milling process, this general algorithm is applicable to any machined surface. Finally, the validity of the method is demonstrated by several simulation examples. Simulation results are compared to experimental ones, and a good agreement is obtained.