Kind of homework related so further reading is always appreciated!
Using sfdisk I have to specify the size of certain partitions in bytes.
For this I used
sfdisk -lub /dev/sdd
Which lists the units as sectors of 512b. Is there an option to only show the count of single bytes? I've been slightly cheating and taking the output and multiplying it for the answer!