Almost every parent in this position asks when to tell. The research and the accounts of donor-conceived adults point the same way, consistently enough to be worth stating plainly.
Early, and always
The families where this goes best are the ones where there was never a moment of telling, because there was never a time the child did not know. A three-year-old cannot understand the mechanics and can absolutely understand that they were wanted, and that a kind person helped. The information grows with them.
Why “when they’re older” fails
Two reasons. It creates a secret, and children detect the shape of secrets long before the content. And it converts a fact into a revelation — the same information that would have been ordinary at four becomes, at fourteen, a thing that was hidden. The distress donor-conceived adults describe is very often about the concealment rather than the conception.
What it sounds like at each age
Small children: they were wanted, and someone helped. Primary school: the biology, simply, and the fact that families are built in different ways. Adolescence: the details, honestly, including what you do not know and why. Adulthood: whatever they want to ask.
The question you cannot control
Whether they will want to find the donor. Some do, some never do, and it is not a verdict on you. What you can control is whether they have to go behind your back to find out — and whether the information exists at all, which is decided now, by what you write down.
If you have not told them yet
Sooner is better than later, and later is much better than a DNA test. Home ancestry testing has made the secret unkeepable in practice. It is far better for a child to learn this from you.