Of course, if you are on the grid so it can give you the 24/7 power you must have. You simply look at your total KWH usage over a year, then install a system that will collect that much power during the sunny times. The system will be very expensive, especially if you live where you have a lot of cloudy/rainy/snowy days, but it can be done as long as you have enough area for the panels.
For example, here in my town the sun shines like almost every day, and we hardly have a real winter, so it is probably one of the cheapest areas to do this. A system for my 2000 sq. ft. home to cover 100% of my usage will cost about $40,000-$50,000, depending on type and area of roof and mounting requirements. If I make a lot of money and pay a lot of taxes, I can get $10,000 or more in tax credits (That is I get to use some of your hard-earned your money to pay for my system????), and my electric company will also give me some rebate. My total electric costs for a year is about $2600. As you can see it will never pay for itself because the equipment will need replacing long before I get my money back not even counting for any cost of interest on my money, but if you are wealthy you can do it for the good of the earth. Of course if you live in an area where the days are not always sunshiny, then the cost will go up because the system must be larger as the days /hours of sun are increased. Cost also may go up if a very cold area.
You need to be on the grid because in most areas the electric company will "Buy Back" or "Credit" you with all the power you produce over what you need during sunny times. This offsets all the time you are using power from the grid. Nights and cloudy days. Don't even consider an "Off-Grid" system with batteries for storage because the system must be even larger and more costly, or you must be willing to not have AC or Heat on it.
Engineer 40 years. Love Solar energy, but hate Solar Salesmen and others that lie about the real cost of solar power.
Just go to your electric companay's web site. Many, if not most, have info on rebates, tax credits, cost, etc. Ours even has solar system calculators to help size your system and estimate costs.