If you extend the subscription, then the charge is calculated as follows:
Charge = (Plan price ÷ Number of days in the plan billing period assuming plan starts from the current date) x Number of days extended.
On the other hand, if you reduce the length of the subscription, credits are raised as follows:
Credits = (Plan price ÷ Total number of days in the current term of the subscription) x Number of days reduced.
Note: The above calculation is done to the millisecond if the billing mode set for Chargebee is millisecond-based