Does 1 Unbreaking II shovel last longer than 2 Unbreaking I shovels?
Unbreaking causes tools to take durability damage only 100/(level+1)%
of the time. For Unbreaking I, tools take damage 50% of the time, so your effective durability is 2x. For Unbreaking II, tools take damage 33% of the time, so the effective durability is 3x.
2 Unbreaking I shovels would have an effective durability of 4x (since there's 2 of them at 2x each), wheras the Unbreaking II shovel you could combine them into is only 3x.
So, if you want to go for the hyperefficient analysis of the durability, yes, 2 Unbreaking I shovels will last a little longer overall than one Unbreaking II shovel.
If you use one of shovels almost to breaking point, then combine (puting used one in second slot of anvil), you'll get to use 5 unenchanted shovels worth of durability, for same cost in levels as combining before using; you could also use ~12% of the shovel that goes into first slot, but then combining would be also repairing and would cost a bit more, but you'll get ~5.24 shovels worth.
The formulae for unbreaking is (100(level+1)) % chance for a use to use a durability.
So:
- an Unbreaking I shovel has a 50% chance that each use will not be free. (Lasts Twice as long)
- an Unbreaking II shovel has a 33% chance that each use will not be free. (Lasts Thrice as long)
Now this is all based of RNG so YMMV, but statistically speaking, each unbreaking I shovel (and you have TWO of them) is basically two shovels, and each unbreaking II shovel (and you WOULD have ONE of these) is basically 3 shovels.
2+2=4.
3=3.
Use two Unbreaking I.
Formulae source