We will not go into electrical calculations of when a subpanel is needed but one thing to note with Enphase is "how many branches are there"?
Anytime there are 5 branches or more you need a subpanel.
What is a branch you may ask?
One branch is needed for every 13 modules OR for every 10 if using domestic content and one branch is needed for every battery. Here are some examples:
Example 1: 17 panels (NOT Domestic Content) and 3 batteries
1 branch for the first 13 panels
1 branch for the next 4 panels
1 branch for battery 1
1 branch for battery 2
1 branch for battery 3
Total = 5 branches meaning we NEED a subpanel.
Example 2: 20 panels and 2 batteries
1 branch for the first 13 panels
1 branch for the next 7 panels
1 branch for battery 1
1 branch for battery 2
Total = 4 branches meaning we do NOT need a subpanel (we may still need one for other reasons but not for Enphase specifically).
Example 3: 17 panels (Domestic Content) and 3 batteries
1 branch for the first 10 panels
1 branch for the next 7 panels
1 branch for battery 1
1 branch for battery 2
1 branch for battery 3
Total = 5 branches meaning we NEED a subpanel.
Keep in mind if this project is a Backup project you generally will NOT need a subpanel as one is already included in the cost of the Backup Adder.