# Product Engines - Formulas and Definitions for Quantity Calculation & Number Up

In this document we will define the various formulas that you can use in your Product Engines.

In the Quantity Calculation and Number up field drop downs you will see the following options:

See the following list for definitions and examples.

1. Abs() - Returns the absolute value. For example (-20) = 20

2.  Floor() - Rounds a number downwards to the nearest integer. For example 20.75 = 20

3. Ceiling() - Rounds a number upwards to the nearest integer. For example 20.25 = 21

4. Min() - Returns the lowest value from a list or string of items. For example (3,5,1,8,2) = 1

5. Max() - Returns the highest value from a list or string of items. For example (3,5,1,8,2) = 8

6. Round() - Returns the nearest integer. For example 20.25 = 20 & 20.75 = 21

7. CalcNup() - Returns the maximum amount up based on the PageHeightPageWidthSheetHeightSheetWidth, Bleed.

CalcNup(PageHeight,PageWidth,SheetHeight,SheetWidth,Bleed)

For Example: SheetHeight=12, SheetWidth=18 & Bleed =0

CalcNup(Height,Width,12,18,0)  If user enters 11 for the Height and 8.5 for the Width the formula will calculate 2up. If the user enters 8.5 for the Height and 11 for the Width the formula will calculate 2up also, it will always return the maximum number up.

8. AltNup() - Returns the exact amount up based on the PageHeightPageWidthSheetHeightSheetWidth, Bleed.  This is good to use when grain direction matters and you may choose the lower amount up.

For Example: SheetHeight=12, SheetWidth=18 & Bleed =0

AltNup(Height,Width,12,18,0)  If user enters 11 for the Height and 8.5 for the Width the formula will calculate 2up. If the user enters 8.5 for the Height and 11 for the Width the formula will calculate 1up. The formula only compares the page height and page width in one direction so it is actually based on the users entry.

9. Nup() - Can only be used if CalcNup or AltNup is used in the number up field. Nup() takes the value from the CalcNup field or AltNup field.

If you have questions or need help, please open a support ticket by selecting this link