I sort-of agree with the views many have expressed, that personhood begins around the same time as consciousness. The problem is, I don't have even a reasonable guess at when that happens. It's after conception, yes. It's after the development of the nervous system, sure. But when?
David Chalmers, as ridiculous as his philosophy often is, was right about calling it "the hard problem of consciousness". We don't even know how a physical process can result in human-style self awareness, much less the mechanisms that do so. If/when neurobiology gives us some sort of answer for that, we might be able to actually know when a human goes from being a clump of cells to a self-aware clump of cells.
Whether self-awareness should be the defining limit for when you get the legal right not to be killed is a more philosophical problem. But my stab at it is: Imagine a parallel universe where the nervous system develops much, much later than in the real world. Say, that at birth the brain is entirely indistinguishable from that of a rat, and over the first two years postpartum it develops towards human level. In this world, where a newborn is most definitely not self-aware, I would still be against a law allowing parents to kill newborns at will, because they have the potential to become actual persons. Which makes me think that the real cutoff point (for me) has more to do with when foetus no longer needs the mother's body to survive.
The problem of consciousness, I think, matters a lot when wondering about the ethics of killing. If a mother can, with no serious harm to herself, sustain the foetus, then I think it would be the right thing for her to do so; and how serious the harm must be to make an abortion ethically justified depends a lot on whether the foetus is a person or only a potential person. But that's miles away from saying that she should be legally forced to do so in any scenario. The laws sometimes have to allow things that would be wrong, because a general law that would ban it would be even worse.
Blah, blah blah, TL;DR, the legal limit should be when the foetus can survive without the mother, the ethical limit is a whole lot trickier and requires information I don't have regarding the specific mechanisms of consciousness.