MongoDB charges for backup storage in its Cloud Manager service, with the first 1GB of data per replica set always free. After that, it costs $2.50 per GB per month or $30 per GB per year for prepaid customers. The total data size is calculated by adding `dataSize` and `indexSize`, and can be found using a script that automates this calculation for each database in the MongoDB cluster. The script also formats the output to display the sizes in human-readable units (GB, MB, KB). The local database is excluded from backup storage, as it is not backed up by Cloud Manager.