Joist & rafter span checker
Say what the member is, how far it spans and its spacing, and see which No. 2 lumber sizes the IRC span tables allow.
Result
At 16" OC you need 2×10 — but 2×8 clears it at 12" OC (12 ft 6 in). More deck joists of smaller stock, same code.
How is this calculated?
Using the tool
The code's span tables, read for you: say what the member is, how far it has to reach, and what it's made of — and see which lumber sizes the IRC allows at your spacing, straight from Table R507.6 for deck joists, Tables R802.4.1 for rafters and Tables R502.3.1 for floor joists, at the grade the yard actually stocks (No. 2).
The code tables
A span table is two checks folded into one number: the member must be strong enough not to break (bending) and stiff enough not to bounce (deflection — L/360 for floor and deck joists, L/180 for rafters with no ceiling; floors get the strict limit because a bouncy floor feels broken long before it is). Whichever check runs out first sets the printed span. That's why the numbers don't scale linearly with depth, and why a heavier snow load walks every span down the ladder.
Two conventions matter in the field: a rafter span is measured horizontally — the projection, the same run your rafter cut uses, not the sloped length — and deck tables already assume wet service, which is why the same 2×10 reaches farther inside a roof than out on a deck. Everything here is No. 2 grade: what the yard hands you unless you ask and pay for better.