Managing inventory supply chains often leads to costly ordering discrepancies when raw unit demand does not align with supplier packaging. While standard funding sources and working capital secure your purchasing power, translating demand into optimal order quantities remains a persistent operational bottleneck.
Fortunately, Excel's MROUND function grants planners immediate mathematical precision, eliminating manual calculation errors. Under the stipulation that MROUND rounds strictly to the nearest multiple rather than always rounding up, a demand of 43 units with a case size of 12 will automatically round to 48.
Below, we outline the exact formula syntax, step-by-step implementation, and essential rounding alternatives for your inventory sheets.
In supply chain management, inventory planning, and purchasing, one of the most common operational challenges is aligning customer demand or theoretical forecast numbers with physical packaging constraints. Suppliers rarely ship products in loose, individual units. Instead, items are packed, stored, and shipped in standardized cases, cartons, or pallets.
If your sales forecast indicates you need 43 units of a specific product, but that product is only distributed in cases of 12, you cannot simply order 43 units. You must decide whether to round down to 36 units (3 cases) and risk a stockout, or round up to 48 units (4 cases) and carry a temporary surplus. Manually calculating these adjustments for thousands of Stock Keeping Units (SKUs) is highly inefficient and prone to human error. Fortunately, Microsoft Excel provides a suite of powerful functions designed to automate this exact process.
This comprehensive guide will demonstrate how to build dynamic Excel formulas to round inventory quantities to the nearest case size, always round up to prevent stockouts, or round down to fit strict shipping or storage limits.
To round numbers to a specific multiple (the case size) rather than a decimal place, Excel offers three primary functions:
MROUND: Rounds a number to the nearest multiple of a specified value.CEILING.MATH: Rounds a number up to the nearest multiple of a specified value.FLOOR.MATH: Rounds a number down to the nearest multiple of a specified value.Let us explore how and when to apply each of these functions in an inventory management context.
MROUNDThe MROUND function is ideal when you want to minimize the variance between your theoretical demand and your actual order quantity. It mathematical rounds up or down depending on which multiple of the case size is closest to your target number.
=MROUND(number, multiple)
Imagine you have a target demand of 50 units, and your case size is 12 units.
=MROUND(50, 12)
The multiples of 12 near 50 are 48 (4 cases) and 60 (5 cases). Because 50 is closer to 48 than it is to 60, Excel will return 48.
If your demand was 55 units:
=MROUND(55, 12)
Excel will return 60, because 55 is closer to 60 than to 48.
CEILING.MATHIn retail and manufacturing, preventing stockouts is often the top priority. If your customer requires 41 units, ordering 36 units (3 cases of 12) will leave you 5 units short, resulting in unfulfilled orders and lost revenue. In this scenario, you must always round up to the next full case.
While the older CEILING function still works in Excel, the modern CEILING.MATH function is preferred due to its improved performance and consistent behavior with negative numbers.
=CEILING.MATH(number, [significance], [mode])
If your customer needs 41 units and your case size is 12:
=CEILING.MATH(41, 12)
Even though 41 is mathematically closer to 36 (3 cases) than to 48 (4 cases), CEILING.MATH forces the calculation upward, returning 48 units (4 full cases).
FLOOR.MATHThere are situations where you must never exceed a specific threshold. For example, if you are filling a shipping container with a strict weight limit, or if you have a finite budget allocation that cannot be exceeded, you must round your order quantity down to the nearest full case.
=FLOOR.MATH(number, [significance])
You have budget/space to store up to 95 units of an item. The item is packed in cases of 20.
=FLOOR.MATH(95, 20)
Excel will return 80 units (4 cases). Rounding up to 100 units (5 cases) would violate your storage or budget constraint.
To see these formulas in action, let us look at a standard inventory calculation table. Below is a sample spreadsheet layout where we track several items, their theoretical forecast requirements, and their case pack sizes.
| Product ID | Product Name | Forecast Demand (Units) | Case Size (Units) | MROUND (Nearest) | CEILING (Round Up) | FLOOR (Round Down) |
|---|---|---|---|---|---|---|
| SKU-101 | Premium Widget | 74 | 24 | 72 =MROUND(74,24) |
96 =CEILING.MATH(74,24) |
72 =FLOOR.MATH(74,24) |
| SKU-102 | Eco Packaging Box | 105 | 50 | 100 =MROUND(105,50) |
150 =CEILING.MATH(105,50) |
100 =FLOOR.MATH(105,50) |
| SKU-103 | Industrial Bolt | 322 | 100 | 300 =MROUND(322,100) |
400 =CEILING.MATH(322,100) |
300 =FLOOR.MATH(322,100) |
| SKU-104 | Adhesive Tape Roll | 11 | 6 | 12 =MROUND(11,6) |
12 =CEILING.MATH(11,6) |
6 =FLOOR.MATH(11,6) |
Often, your purchasing department does not want to see the total number of units to order; they want to see the number of cases to write on the purchase order.
To output the quantity in cases while ensuring you round up to whole cases, you divide the rounded unit result by the case size:
Formula:
=CEILING.MATH(Demand, CaseSize) / CaseSize
Example:
If your demand is 45 and case size is 10:
=CEILING.MATH(45, 10) / 10 yields 5 cases (representing 50 units), rather than 4.5 cases.
In real-world procurement, suppliers often impose a Minimum Order Quantity (MOQ) alongside case sizes. For instance, you must order in multiples of 12 (case size), but you must purchase at least 100 units (MOQ) per order.
You can combine Excel's MAX function with your rounding formulas to ensure your order quantity satisfies both the minimum requirement and the case packing constraints.
Formula:
=MAX(MOQ, CEILING.MATH(Demand, CaseSize))
Example:
Let us assume:
=MAX(72, CEILING.MATH(45, 12))CEILING.MATH(45, 12) to 48. It then evaluates =MAX(72, 48) and outputs 72.
In large operational workbooks, your case sizes are usually stored on a separate "Product Master" sheet rather than hardcoded into your calculation sheet. You can use XLOOKUP (or VLOOKUP) inside your rounding functions to pull case sizes dynamically based on the Product ID.
Assuming you have a Master SKU table on another sheet where column A contains the SKU and column B contains the Case Pack Size, and your ordering sheet has the target SKU in cell A2 and required units in cell B2:
Formula:
=CEILING.MATH(B2, XLOOKUP(A2, MasterSheet!A:A, MasterSheet!B:B))
This nested formula locates the correct case pack size for the specific SKU in cell A2 and then instantly rounds your demand in cell B2 up to the next full case size, maintaining a completely dynamic and automated inventory pipeline.
CEILING.MATH for Service Level Optimization: Use this when keeping stock on hand is cheap compared to the reputational and financial costs of stockouts.FLOOR.MATH for Freight and Volumetric Limits: Use this when you are constrained by a physical container, truck bed, or storage rack capacity limit.Rounded Units / Case Pack Size) to make the final output intuitive for your warehouse receipt team and your suppliers.
Disclaimer:
The documents and templates provided on this page are for informational and illustrative purposes only. They do not constitute professional, legal, or financial advice, and should not be relied upon as such. Because individual circumstances and regulatory requirements vary, these materials may not be suitable for your specific needs. We recommend consulting with a qualified professional before adapting or using any of these examples for official or commercial purposes.