Estimate the installed size of a dependency tree including transitive packages.
Transitive dependencies dominate the tree, commonly outnumbering direct ones eight to one. Installed size therefore bears little relation to the dependencies actually declared. Each transitive dependency is also a supply chain surface, which makes the count a security concern as much as a size one.
Dependency Size
Total packages = direct × (1 + transitive per direct); installed size = packages × average size
Total packages = direct × (1 + transitive per direct); installed size = packages × average size Transitive dependencies dominate the tree, commonly outnumbering direct ones eight to one. Installed size therefore bears little relation to the dependencies actually declared.
Each transitive dependency is also a supply chain surface, which makes the count a security concern as much as a size one.
This calculator takes 5 inputs: Direct dependencies, Transitive dependencies per direct one, Average package size, Share that are duplicate versions, Saving from tree shaking in the bundle. The pre-filled defaults are a realistic starting point — replace them with figures from your own environment for a result you can act on.