when you consider the number of
need to build a castles, you have to include the cost of the walls, too, as they are a typically useless building. i guess you say that 150 hammers is the total needed.
i'm not sure about 100 if you have stone.
you also leave out protective as a booster, and then you might also be running OrgRel, and with stone AND a forge, the cost of castles becomes negligible for SOME lucky civs.
if you can build a castle in less than 4 turns on a normal speed game, it is probably worth it IF you aren't going to obsolete them anytime soon. duh. but, say i have all those bonuses from the last paragraph, and it's in a bureau capital, then by adding a castle i might get an extra 4-5 gpt then i'd say do it. if it's a secondary city, but coastal with high production, i'd do it. most of the time i won't do it because i'm heading towards tech paths that are going to have relatively late engineering and early rifles, if i can.
the general consensus around the forums is probably that castles suxx0r, and so does the customs house.