The average daily benefit to cost ratio of a building energy storage system is mainly constrained by the battery lifetime. This paper aims to minimize the average daily cost of a hybrid energy storage system (HESS) (comprised of a battery and supercapacitor) by optimizing the battery capacity. A novel optimization model is proposed with the objective to find the minimum average daily investment cost of the HESS. The objective function has two parts: (1) the investment cost formula for the battery is derived as a function of the battery capacity, which has an interdependence with the minimum state of charge (SOC) and the maximum discharge current; (2) the investment cost formula for the supercapacitor is also established as a function of battery capacity by matching the maximum battery power with that of the supercapacitor. Case studies demonstrate several ways to increase the average daily benefit to cost ratio: (1) adopting a suitable control strategy to avoid capacity saturation; (2) reducing the battery SOC to increase the threshold for the maximum discharge current (MDC) saturation; and (3) increasing MDC to raise the threshold for the SOC saturation. Results show that the average daily benefit to cost ratio is doubled compared to previous work.