diff --git a/netbox_proxmox_sync/api/proxmox/extract.py b/netbox_proxmox_sync/api/proxmox/extract.py
index 4d676c0c7d570b5c3347b94adf7a2c50aae58e8e..203bab2b60723b5e0312a0637b64d37ad4110717 100644
--- a/netbox_proxmox_sync/api/proxmox/extract.py
+++ b/netbox_proxmox_sync/api/proxmox/extract.py
@@ -99,7 +99,7 @@ def extract_vm_data(cluster_name, node_name, vm_status):
         'device': {'name': node_name},
         'cluster': {'name': cluster_name},
         'vcpus': vm_status['cpus'],
-        'memory': vm_status['maxmem'] / 2**10,
+        'memory': vm_status['maxmem'] / 2**20,
         'tags': [{'name': tag} for tag in vm_config['tags'].split(';')],
         'custom_fields': {'vmid': vm_status['vmid']}
     }