Is it better to run a laptop off the battery or to take the battery out when you can plug it into the wall?

we bought our first laptop. we know you can run it off the wall plug when not traveling, but will that hurt the battery or is it best to take the battery out unless it is needed?
2 answers 2