How to Calculate Freight, Cost, Markup, and Retail Price in Excel
Question details
The user needs to calculate freight and retail pricing based on cost, markup, and specific grower freight rates without adding unnecessary calculation columns.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Managing an inventory worksheet that requires calculating total retail prices involving variable freight rates assigned to different growers.
- Observed behavior
- The user wants to streamline the worksheet by looking up grower-specific freight rates and applying them directly within a single retail price calculation formula.
Ensure you have a complete list of your growers and their corresponding freight rates set up in a separate table range before writing your calculation formula.
Use VLOOKUP to Calculate Retail Price with Variable Freight Rates
Create a lookup table for your freight rates and use the VLOOKUP function to pull the correct rate into your combined retail price formula.
Instead of creating multiple intermediate columns to calculate the freight and markup separately, you can combine these steps into a single formula. By setting up a lookup table for the growers and their rates, Excel can dynamically fetch the correct freight value for each line item.
In a blank area of your worksheet (e.g., cells H3:I6), create a two-column table. Enter the grower names in the first column and their corresponding freight rates in the second column.
Ensure your main inventory table has dedicated columns for the Grower (e.g., Column A) and the base Cost (e.g., Column E).
Type your standard markup rate into a standalone cell, such as K3. This allows you to easily update the markup for the entire inventory at once.
In your Retail Price column (e.g., cell F4), enter the formula: =(E4*VLOOKUP(A4,$H$3:$I$6,2,0)+E4)*$K$3. This formula looks up the freight percentage, multiplies it by the cost, adds the original cost, and multiplies the total by the markup.
Select cell F4 and double-click or drag the fill handle in the bottom-right corner to copy the formula down to the rest of your inventory items.

Calculate Retail Prices and Freight Costs Easily in WPS Spreadsheet
WPS Office offers a powerful, free Spreadsheet application fully compatible with Excel formulas like VLOOKUP. You can effortlessly manage inventory, lookup dynamic rates, and calculate complex retail prices in a lightweight environment.
- 1. Open your inventory sheet: Launch WPS Spreadsheet and open your existing inventory workbook.
- 2. Set up the lookup table: Enter your list of growers and their specific freight rates into an empty cell range.
- 3. Enter the VLOOKUP formula: Click the target cell for your Retail Price and input the combined VLOOKUP and arithmetic formula to calculate the final price automatically.
- 4. Fill the column: Drag the fill handle down from the calculated cell to apply the formula to all inventory items instantly.

Frequently Asked Questions
Why is my VLOOKUP returning an #N/A error?
The #N/A error typically occurs if the grower's name in your main inventory table doesn't exactly match the name in your lookup table. Check for typos, extra spaces, or mismatched spelling in both ranges.
Can I use XLOOKUP instead of VLOOKUP for this calculation?
Yes. If you are using a version of Excel or WPS Office that supports XLOOKUP, you can replace the VLOOKUP portion. XLOOKUP is often preferred because it is more flexible and does not require you to count column index numbers.
How do I adjust the formula if my freight rate is a fixed fee instead of a percentage?
If your growers charge a flat fee instead of a percentage based on cost, you can skip multiplying the freight by the cost. Adjust the formula to simply add the lookup result to the base cost: =(E4+VLOOKUP(A4,$H$3:$I$6,2,0))*$K$3.




