The math behind all of this is actually very simple: manufacturers like to use a base of 10 for their capacity calculations whereas computers work on a base of 2. Taking a 256GB SSD as example this means the following.
256 GB = 256,000 MB = 256,000,000 KB = 256,000,000,000 Bytes
That is the actual capacity of your drive: 256 Billion Bytes, or 2.048 Trillion Bits. Given that modern computers aren't decimal but binary machines they operate on a base of 2 and a K of 1,024 (2^10) instead of 1,000 (10^3). In other words:
256,000,000,000 Bytes = 250,000,000 KB = 244,140.625 MB = 238.419 GB
In other words: a 256 GB SSD will give you slightly over 238 GB of usable storage space.