Minecraft surface area calculator

Usually you can calculate the surface area of a rectangular prism with side a, b and c using the formula 2ab+2bc+2ac: http://www.math.com/tables/geometry/surfareas.htm#rec

However, in minecraft blocks can be part of two or three sides (in the case of a corner), which means that you need fewer blocks to cover the surface of such a prism than the result this formula. The formula is: 2ab+2(bc-2b)+2(ac-2b-2c).
You can derive this by taking the surface of each side, and subtracting the length of two sides, and the length and width of 2 other sides. Though beware that this does not work with sides of 1 or 2, in those cases it's just a*b*c.

prism

Length:
Width:
Height:

In Excel, the formula, with the sides in A1, A2, and A3, is:
=2*A1*A2+2*(A2*A3-2*A2)+2*(A1*A3-2*A2-2*A3)
Note: does not work with sides of 1 or 2, in that case it's just =A1*A2*A3.

Source code: https://github.com/vzx/minecraft-surface-area-calculator