There have recently been a huge number of posts asking for different types of rounding. I've attempted to compile here some tricks that have come in useful for me in the past. In all cases, "x" is the number you wish to round to an integer. Note on rounding numbers of dice : If you use xdN, where x is the value you want rounded, it will be auto-magically rounded to the nearest non-negative integer (0 or greater). DON'T try to use ceil, floor, etc. on the left side of the "d". Also note it will round half up (see discussion on round to nearest below), you could subtract a small value like 0.01 to remove this behavior. Be careful with parenthesis - if you don't have a ")" right before the "d", chances are you're wrong. Round-toward-positive infinity : ceil(x) Round-toward-negative infinity : floor(x) Round-to-nearest : You may use the oft-quoted ceil(x-0.5) or floor(x+0.5), round(x) or even xd1 for positive values (though you'll wish that last was used inline). These three (four) functions are, however, DIFFERENT, as they follow different "tie-breaking rules." These rules determine how one deals with halves like 0.5 (which are exactly between two integers). There is no "right" way, there are only conventions. Round halves up (that is, 0.5 rounds to 1, -0.5 round to 0, etc): The floor(x+0.5) function above behaves this way, as does the new "round" function from Data Delve. R ound halves down (0.5 to 0, -0.5 to -1): The ceil(x-0.5) function accomplishes this. Note if one wishes (for some reason) to use ceil but to round halves up , one can use something like ceil(x-0.49). Round halves toward (away) from zero: In gaming, rather than true math, one can often multiply by something slightly smaller (larger) than one and then round normally. This has odd effects on the numberline, but will work if you know you're only seeing integers or halves as inputs. See the following example. Example: In Pathfinder temporary stat bonuses/damage, every 2 points of bonus/damage changes the modifier. So we want (x/2) to be rounded to the nearest integer, rounding halves toward zero. Here's a chart: X -4 -3 -2 -1 0 +1 +2 +3 +4 Z -2 -1 -1 0 0 0 +1 +1 +2 In this case, one can use round( (x/2) * 0.99) , or just round(x/2.01) . The range over which this is correct is determined by the number of zeroes or nines you use, but 2.01 will work fine for Pathfinder (2.01 will work for any X between -201 and 201). Even round(x/2.1) works for between 21 and -21. Round-away-from-zero : There isn't a built-in call, and you may wind up with two "round" functions depending on your application. In short, I'm going to suggest you round whatever you need to do toward positive infinity, then make *everything* be a perfect half and then round those away from 0 as per the section in Round-to-nearest. Example: In Warhammer 40k, I've been told that newer versions round as in this post . This can be done with two-stage rounding. I suggested the poster continue to use his existing rounding scheme, which worked for the positive half of the numberline (rounding 0-9 up to +1, 10-19 up to +2), but not the negative half (it rounded -10 to -1 to 0 instead of -1). Then he could put that as the x in "round((x-0.5)*1.01)". At that time, he had to use the ceil or floor versions of round (thanks Brian), and you can find his final formula here . Round-toward-zero : Can be done as in round-away-from-zero, but multiplying by 0.99 or something similar. Note if you're doing this for old versions of WH, you'd lose the "sign" information (in these systems, "0 failures" is different from "0 successes", and I can't help you with that without the API). More rounding questions? Post them here, I'll see if I can help. Or send me a PM. edit : Addressed formatting. edit2: Removed mention of dev server version of round, since that went live with Data Delve (yay!)