HRA is calculated as a percentage of the employee's basic salary. The percentage is determined by the government and is generally between 9% and 30%.