how to calculate maximum allowable current density for a PCB trace?
In addition to the other comments above, a general and easily-remembered rule of thumb for max current in wires is to not allow more than 500A per cm^2 (cross-sectional area). So, for example, if you want a quick calculation for a trace to carry 1A, then the trace will need a minimum cross-sectional area of 1 A / 500 (A per cm^2) = 0.002 cm^2. Very long traces will have greater losses due to resistance, so should be beefed up beyond that.