This is going to sound retarded, but M4 screws have a nominal diameter of 4mm, is that the diameter including threads? is there a tolerance beyond 4mm that an m4-accepting hole should include?
TL;DR “how big should a hole be to accept an M4 screw without engaging its threads?”
This separate from the question of how to properly size a 3d printed hole to account for printer inaccuracy/overextrusion, and undersized holes due to polygonal approximation