You would need a rule if the inputs are the DecimalType states of two items, and the output is the sum of those two Number items:
items:
Number InputA
Number InputB
Number Total
rule:
import org.openhab.core.library.types.DecimalType // not needed on OH2
rule SumTwoInputs
when
Item InputA changed or
Item InputB changed
then
if (InputA.state instanceof DecimalType && InputB.state instanceof DecimalType) {
Total.postUpdate((InputA.state as DecimalType) + (InputB.state as DecimalType))
} else {
Total.postUpdate(Undefined) // or UNDEF on OH2
}
end