This paper proposes an online method for estimating the DC-link capacitance in battery-powered permanent magnet synchronous motor (PMSM) drive systems. The injection signal of the proposed method is generated through a sixth-harmonic torque ripple reduction algorithm. This algorithm reduces torque ripple while simultaneously increasing the sixth-harmonic component of the inverter output power. The resulting sixth-harmonic component of the battery current is then utilized for capacitance estimation. The capacitor voltage exhibits a sixthharmonic ripple induced by the internal impedance of the battery and the impedance of the busbar. To verify the effectiveness, the proposed algorithm was applied under three capacitance conditions, and the average estimation error was approximately 2.75%, thereby validating the method.