The big variables are (rough order) entry airport, the mix of passengers on the exact aircraft you're on relative to your own citizenship/immigration status, the general business (or lack thereof) when the
flight you're on gets in [+], and conditions at the airport on the day of your arrival.
If one very consistently flies exactly Delta 6 and is a US citizen, one will very rarely wait more than 15 minutes in Detroit.
It is, unfortunately, very, very easy to spend hours in line. (4th quartile for me is probably 2 hours; max was close to 5.) If one is selected for secondary screening, throw all estimates out window; you've transitioned from routine travel into an adversarial proceeding with the USFG.
[+] Since most airlines operate on schedules which do not change much on a week-to-week basis it is fairly predictable that e.g. 10 AM on a Tuesday, and hence $BAR Flight $BAZ's scheduled arrival window, will be busy, given that N flights from abroad arrive near that window.