Battery energy storage systems (BESS) coupled with rooftop-mounted residential photovoltaic (PV) generation, designated as PV-BESS, draw increasing attention and market penetration as more and more such systems become available. The manifold BESS deployed to date rely on a variety of different battery technologies, show a great variation of battery size, and power electronics dimensioning. However, given today’s high investment costs of BESS, a well-matched design and adequate sizing of the storage systems are prerequisites to allow profitability for the end-user. The economic viability of a PV-BESS depends also on the battery operation, storage technology, and aging of the system. In this paper, a general method for comprehensive PV-BESS techno-economic analysis and optimization is presented and applied to the state-of-art PV-BESS to determine its optimal parameters. Using a linear optimization method, a cost-optimal sizing of the battery and power electronics is derived based on solar energy availability and local demand. At the same time, the power flow optimization reveals the best storage operation patterns considering a trade-off between energy purchase, feed-in remuneration, and battery aging. Using up to date technology-specific aging information and the investment cost of battery and inverter systems, three mature battery chemistries are compared; a lead-acid (PbA) system and two lithium-ion systems, one with lithium-iron-phosphate (LFP) and another with lithium-nickel-manganese-cobalt (NMC) cathode. The results show that different storage technology and component sizing provide the best economic performances, depending on the scenario of load demand and PV generation.