How do you know it's time to end a relationship?

I’m not really sure what to do here, but I know I am looking for advise please. I have been with my husband for 2 years we’ve only been married for a short time. We were both married previously and have children from those marriages. When things are good they are good, but that only lasts a short time. And then things get bad, we both say awful things to each other. I know I am not happy but my kids have grown to love this man and I don’t know to leave or to stay because of them. There’s a lot being left out but it would take to long to explain everything.