They have calculators on the web for these purposes.
I always use chmod 774, which allows the user and everyone in the user's group to read, write, and execute the file or directory.
Everyone else, not in user's group, can only read and write to file or directory.
Hope this is helpful.
Christine