Index: uspace/app/mkexfat/mkexfat.c
===================================================================
--- uspace/app/mkexfat/mkexfat.c	(revision 2601383224402556983b891ef011070ec6867ba0)
+++ uspace/app/mkexfat/mkexfat.c	(revision b6eb5dac62ef6194751f13cd4a3c085f958543f1)
@@ -164,6 +164,5 @@
 
 		cfg->cluster_size <<= 1;
-		cfg->total_clusters = div_round_up(volume_bytes,
-		    cfg->cluster_size);
+		cfg->total_clusters = volume_bytes / cfg->cluster_size;
 	}
 
@@ -178,4 +177,11 @@
 	    cfg->fat_sector_count, cfg->cluster_size / cfg->sector_size);
 
+	/* Subtract the FAT and bootsector space from the total
+	 * number of available clusters.
+	 */
+	cfg->total_clusters -= div_round_up((cfg->data_start_sector -
+	    FAT_SECTOR_START) * cfg->sector_size,
+	    cfg->cluster_size);
+
 	/* Compute the bitmap size */
 	cfg->bitmap_size = div_round_up(cfg->total_clusters, 8);
@@ -191,10 +197,4 @@
 	cfg->allocated_clusters += div_round_up(sizeof(upcase_table),
 	    cfg->cluster_size);
-
-	/* Subtract the FAT and bootsector space from the total
-	 * number of available clusters.
-	 */
-	cfg->total_clusters -= div_round_up(cfg->data_start_sector *
-	    cfg->sector_size, cfg->cluster_size);
 
 	/* Will be set later */
