Calculating a gridded system requires computer software. The calculation process is long and tedious by hand. You won't want to do more than a tree or a simple loop by hand.
Search online for fire sprinkler calculation software. That is your best bet.