Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
When harry reviewed Snape's memory, Dumbledore told Snape that Harry was the Horcrux Voldemort never intended. Whether or not it was exactly a horcrux, for all intents and purposes, it functioned just like one. A piece of Voldemort's soul was torn off and latched onto Harry. Dumbledore supposed that only happened because Tom had already weakened his soul so much that the rebound of the curse was enough to act as the full ritual would have.
Voldemort had no intention of creating a horcrux when he killed Lilly, but when his curse rebounded, his soul had been so weakened by his prior horcruxes that it ripped one more time and attached to Harry.