The just-in-time concept in manufacturing has aroused interest in machine scheduling problems with earliness-tardiness penalties. In particular, common due date problems, which are structurally less complicated than problems with general due dates, have emerged as an interesting and proli c eld of research. We prove that so-called almost common due date problems, in which the due date d j and processing time p j of each j o b J j (j = 1 : : : n ) are such that d j 2 D D+ p j ] for some constant D, are structurally less complicated also. Our main contribution is an O(n 2 ) t i m e dynamic programming algorithm for the almost common due date problem with large D. The dynamic programming algorithm is interesting in its own right, since the optimality principle behind it applies to other common due date and almost common due date problems as well. 1980 Mathematics Subject Classi cation (1991): 9 0 B 3 5 .