You can use the Grouping syntax for this: [[ {(A-B),0}kh1 ]] Some things to remember: { } Defines a group. You can have 1 or more things in a group. By default, they will be summed. [[ {2,3} ]] will be 5. Items in a group must be either dice rolls or numbers, you can't have both. If you have dice and you need to specify a constant, you can use 0d0 for 0, or #d1 for some #, like 5d1 for 5. k# Modifies the group to be keeping some values from the set, the # determines how many. Alternatively, you can use d# to mean drop # values. h Modifies the keeping instruction to keep (or drop) from the highest end ( h is the default behavior for keep if it is omitted) You can also use l to keep (or drop) from the lowest end ( l is the default behavior for drop if it is omitted)