The spreadsheet is pop neutral: both the seller and trader have the exact same pop for their eco and therefore have the same pop for army. The 40 Mangudai advantage does not include castles or build time because that is assumed to be equal for both players. The 40 Mangudai is EXTRA resources the seller has. Seller can spend those on a castle, on Mangudai, on rams or etc.Your spreadsheet has the trader deleting vills for extra trade carts, but not the seller deleting vills for extra mangudais and using villager time for extra castles. Extra military production has a cost beside resources.