There are 1024 MB in 1 GB.
That number comes from binary math: a gigabyte is 1024 megabytes, a megabyte is 1024 kilobytes, and so on. You will sometimes see the simpler decimal version, 1000 MB per GB, used by storage manufacturers, which is why a drive advertised as one size often reports slightly less once it is formatted.