Those were the median in 2023:
Total loan costs, which include origination fees and discount points, also increased between 2022 and 2023, with faster increases for Hispanic white and Black borrowers. The median total loan costs for home purchase loans in 2023 was $6,684, up by 12.2 percent from $5,954 in 2022. The median total loan costs for refinance loans reached $7,329 in 2023, compared to $4,979 in 2022–a 47.2 percent increase. Notably, Hispanic white and Black borrowers experienced faster increases in the median total loan costs for home purchase loans in 2023 compared to 2022 than Asian and non-Hispanic white borrowers.
Like any median, it's the 50/50 midpoint, so some payed less others more, but it is usually in the range of 3-6% of principal.