If you expect any PvP then it also depends on your tower height, but in general the absolute minimum is 5 blocks, strongly prefer 6 if you're willing to put in the work to dig out that many blocks. I've seen builds with 10+ wide moats and 4 drawbridges but unless you have many people working on your base that might be unfeasible.
Your tower height is important because people can build raid towers and jump over onto your roof if you don't make your tower high enough. Adding additional claim blocks outside of your moat to prevent raid towers is ideal, but people can still screw around with minibike chassis in which case you want a bigger moat.