Customs duties and taxes are calculated based on the value of the imported goods, their classification under the Harmonized System (HS) code, and any applicable trade agreements or exemptions.