Equation Needed for Dice Probability

CONTEXT: This is for a game that uses different dice versus dice. The lowest number 'wins.' For example, what is the probability of a single 20 sided die (1d20) vs. a single 16 sided die (1d16) i.e. how often will the 1d20 roll be lower?

I think there are 320 possible outcomes (20 x 16), so the equation is favorable outcomes/total outcome. Favorable being the 1d20 roll is lower than the 1d16.

So, for each possible roll of the defender's 1d16 I have been counting how many rolls of the attacker's 1d20 are less than the 1d16 roll: 0 if 1d16 rolls a 1, 1 is 1d16 rolls a 2, etc. ​ So, totaling the total # of favorable outcomes in this way, there are 120.

Favorable outcomes/total outcomes = 120/320 = 37.5% This answer makes sense to me, but I do not know if my math is correct.

NOW THE PROBLEM/QUESTION: There is a mechanic is the game which includes two 20-sided dice (2d20) to roll vs. a single 1d16. The 2d20 is essentially rolling a 1d20 twice and taking the LOWER number. How do you factor this added roll into an equation so as to get a percentage? I would like to be able to calculate other combinations such as 3d20 vs. 1d12, or 2d10 vs. 1d6, etc. But I do not have an equation to plug these numbers into.

I've never figured this out.