Hi,
I guess there are thousands of simple tutorials, online calculators, even videos on how to calculate the power dissipation of a resistor.
--> please do a search on your own.
Also there are free and easy to use circuit simulators. They all should be able to calculate power dissipation.
*****
Generally power dissipation P = V * I.
This is rather basic. It is true for all passive devices that can´t store or convert energy. True for R, D, LEDs, transitors and so on.
(Not true for C, L, batteries, motors...)
V is always measured across the device (along the current flow)
This means: if you have a resistor, one leg at 3.3V and the other at 3.1V --> then you have to use the voltage across them which is (3.3V - 3.1V) = 0.2V
And according Ohm´s law (also very basic) the current through the resistor: I = V / R (again here the voltage across the resistor)
I expect you to be able to rearrange Ohm´s law to get V and R respectiviely.
****
In your case:
It´s not important "how much current the output can drive" but it´s important "how much the input will draw".
****
Until now ... all basic.
So it´s time to step into some "more complicated details":
The current is not continuous!
* There may be time when the current is flowing (depending on pin function, pin input characteristics)
* and the pin (and trace) acts as a capacitance. Thus you get additional "capacitive current". Here resistor P = 0.5 * V * V * C for each signal edge.
*****
In most cases the power dissipation can be ignored.
Klaus