material calculation