The optimal pitch, or angle, for a solar panel varies depending on the latitude of the installation. The position of the sun overhead moves throughout the course of the day as it rises and sets and shifts relative to the tilt of the Earth during the year with the changing of the seasons. In an ideal world the best way to maximize energy generation from a solar installation is to have a dual axis solar tracker. Needless to say, for residential or small commercial solar pv installations a dual axis tracker is impractical (needs space) and adds cost.
While there are a number of different software products available to find the ideal pitch and the calculation itself isn’t all that difficult to do, those are somewhat unnecessary. There is a good general rule of thumb that if you are above 30 degree latitude in the Northern Hemisphere a pitch somewhere between 20 and 30 degrees is ideal. Two excellent resources for the industry have more detailed explanations. But the big take away from both of them is that pitch is far less important than orientation, which should absolutely face south.
For an optimal installation, you want south facing and somewhere between 20 and 30 degree pitch… if you want a more in-depth discussion, checkout this article from Civic Solar Solar Array Tilt Angle And Energy Output.
Energy Sage also did a good comparison of performance between a 5 degree and a 30 degree pitch and found only a 10 percent difference in energy production. Read the full article here at What’s The Best Angle For My Solar Panels.
There are definitely a few nuances to the above which are worth understanding.