sample calculation