Mastercam's Built-in Calculator
Fields that take number values have a built-in calculator that let you enter simple formulas directly in the field. For example, type 9/32 in a field, and Mastercam displays the value 0.28125. With the calculator, you can:
- Use a full set of arithmetic operators
- Use parentheses to create more complicated expressions
- Enter formulas using algebraic notation
- Specify units of measure, such as degrees or feet
- Call mathematical functions
- Specify circle and arc diameters
Click a drop-down below to see more information.
| Symbol | Description | Symbol | Description |
|---|---|---|---|
| d | Degrees | m | Meters |
| ' | Minutes | km | Kilometers |
| " | Seconds | um | Microns |
| g | Gradians | in | Inches |
| r | Radians | ft | Feet |
| mm | Millimeters | f | |
| cm | Centimeters | yd | Yards |
- Always place the unit symbol after the numeral (for example, 45mm).
- One or more spaces between the numeral and the unit symbol are optional. For example, both of these values are acceptable: 25in, 25 in.
- If a value has no unit symbol, Mastercam uses the current default units (inches or millimeters, set on the Start / Exit page of the System Configuration dialog box).
- Use parentheses or additional unit symbols to clarify ambiguous values. For example, suppose Mastercam is set to millimeters. If you want to divide 3mm by 4cm, the entry 3/4cm is incorrect. (It's evaluated as 3/4 of a cm.) Instead, write the expression as 3mm/4cm or 3/(4cm).
- To convert an entire expression to a unit type, multiply the expression by the desired unit. For example, to convert the expression (22/7)*2.5^2 to centimeters, type ((22/7)*2.5^2)*1cm. (Note the parentheses around the original expression.)
| Operator | Description | Example |
|---|---|---|
| + | Addition | 5+3 = 8 |
| - | Subtraction | 5-3 = 2 |
| * | Multiplication | 5*3 = 15 |
| / | Division | 5/3 = 1.666 |
| \ | Integer division | 5\3 = 1 |
| ^ | Exponent | 5^3 = 125 |
| Mod | Modulus | 5 Mod 3 = 2 |
| Constant | Description |
|---|---|
| #pi | pi |
| #e | e |
| #RadToDeg | Radians to degrees |
| #DegToRad | Degrees to radians |
Constants are case-insensitive. For example, the entries #pi, #Pi, and #PI are equivalent.
| Function | Description | Function | Description |
|---|---|---|---|
| Abs() | Absolute value | Acos() | Arccosine |
| Asin() | Arcsine | Atan() | Arctangent |
| Atan2() | Arctangent that handles the singularity that occurs when x equals 0.0. | Cos() | Cosine |
| Exp() | Exponent (base e) | Fix() |
Removes the fractional part of a number. For a negative value x, Fix(x) returns the nearest integer of x that is closest to 0.0. For example, Fix(-1.4) returns -1.0. |
| Int() | Removes the fractional part of a number. For a negative value x, Int(x) returns the nearest integer of x that is closest to negative infinity. For example, Int(-1.4) returns -2.0. | Log() | Natural logarithm (base e) |
| Sgn() | Sign of | Sin() | Sine |
| Sqr() | Square root | Tan() | Tangent |
All trigonometric functions assume angles in degrees.
Specify diameters quickly and without consulting printed drill charts. Type [#] and a drill number from 1-97, or type [#] and a drill letter from A-Z in a calculable field to automatically enter the correct diameter.
In metric configurations, Mastercam automatically converts inch drill diameters to their metric equivalents.
- Units default to the current system units (inches or millimeters), but may be overridden on a value-by-value basis by using unit symbols.
- You can use mathematical expressions in both integer and floating-point fields. However, if you are in an integer field, Mastercam discards the decimal portion of the result.
- Wherever Mastercam accepts real numbers and formulas, you can enter an angle value in degrees/minutes/seconds or gradians/radians format.
- Rather than entering Pi as 3.14159265, just type #pi. Mastercam calculates the resulting value out to the decimal limits of the field.
- In Fast Point mode, the entry field accepts numbers, fractions, decimal values, and even formulas. For example, to enter a point position of X6, Y3, Z0.5, you could type X(2*3)Y(5-2)Z(1/2).
- The calculator treats a space between values as an addition operator (+). For example, the entry 5 8 3/4 evaluates to 13.75.
- By default, fields in which the calculator is active have a yellow background. You can change this color on the Colors page of the System Configuration dialog box.





