How do you calculate HP of monsters in D&D?

I want to create a new monster for D&D.
I'm looking at Giant Spider as a reference point: 26 HP, but it says 4d10+4 - How do I use that for calculating monster HP?
4d10+4 doesn't seem like it should equal 26.
1 answer 1