Is there a mathematical formula between wire size, current, temperature and wire type(Or resistance)?
Your question is rather broad. Assuming ampacity is what you are interested in determining, normally it is not determined by one formula. A single strand of wire may have a certain allowable current at STP, depending on the insulation and conductor type. That can be derated based on the maximum ambient temperature, maximum altitude, and bundling with other wires. There may be other constraints that have to be satisfied (standards and regulations, voltage drop limits, fuse rating etc).
For example, one might refer to AC 43.13 for aircraft wiring. (Charts are from the FAA regulation)
This would give you a very optimistic ampacity of almost 20A for a normal high performance AWG20 aircraft wire (200°C rated).. That's based on a single wire (not a bundle) at sea level. A 90°C rated PVC wire that has to work at 60°C ambient would be capable of about half that. You might have to derate 25% or 30% for altitude in an aircraft (depending on the aircraft specifications). In a vacuum, a lot more than that.
Then the derating for bundle size:
After all that we might be down to an amp or two for the cheap wire.
In the case of very large wires or high frequencies you may have to take skin effect into account and derate for that.
Here is another reference ( non aircraft).
Note that all constraints must be satisfied for the particular application-- regulatory, voltage drop, mechanical robustness, fuse ratings, etc.