I suggest that you use gparted. It has an easy graphical user interface and lets you select size in Mibibyte units (2^20) bytes.
If you prefer a command line tool you can use parted (and use a separate tool to create the file system). Then you can select size more accurately, but you should be careful to match the start of a partition with the sectors of the drive.
Both tools work with MSDOS and GUID partition tables (GPT).
Bookmarks