Instance pricing is calculated from the time the instance is created to the time the instance is deleted. Instances are billed in one second increments with a 10 minute minimum charge following a billable status change such as creating, modifying, or deleting an instance.
As an example, if you create an r5.large instance at 1:00:00 PM, modify the instance to an r5.xlarge at 1:30:00 PM and delete the instance at 1:50:00 PM, you will be charged for 1,800 seconds (30 minutes) at r5.large pricing and 1,200 seconds (20 minutes) at r5.xlarge prices. If you create an r5.large instance at 3:00:00 PM and delete it at 3:06:00PM, the 10 minute minimum applies, and you will be charged for 600 seconds (10 minutes) at r5.large pricing.