How does Azure calculate the price for the resources that I consume?

Azure metering of the resources works based on consumption and is a pay as you use model. Most of the Azure Infrastructure and Platform components are priced based on the number of hours a resource is live and running in Azure platform. For Example, A Virtual machine will incur both Compute and storage charges while actively running, but will only incur storage charges when the virtual machine is shutdown.

All resources are metered against time and the smallest unit is an hour. The only resource in Azure Calculator that is charged based on the number of users is the Azure Active directory subscription and this is not based on hours.