Earlier quoted context omitted.
7-10 years to break even. If the panels last 15 years you'll see a net return of $21,416 on investment of $18,888. If they last 25 years, that net return grows to $48,186. In either case it works out to an annual rate of return of 5%, assuming electricity prices stay the same (BIG ASSUMPTION) and also assuming the weather doesn't change to get cloudier or more violent (also a big assumption).
Is net return all that matters? Seems like with increasing heat waves, power outages etc, being able to generate and store your own electricity has value from a resiliency standpoint.
It's certainly possible to have a solar installation that does let you disconnect from the grid, but it requires extra hardware (including a battery backup).