Close Window
Free Excel Training!
Learn How to Use Macros in Excel!

Formula For Calculating Profit Margins

Hello All

I am currently using the following formula to calculate my profit margins on sales (where profit margin is defined as the percentage of the final selling price that is profit)

Margin=("Selling Price"-"Cost Price")/"Selling Price"

In the above, Selling Price and Cost Price are inputs in Currency, Margin is the output as a percentage.

I would like a formula that can calculate a final selling price from a Margin Percentage and the cost price (i.e. how much should I sell something for to make x% Margin) but I cant figure it out.

Any ideas?

- Ask any question about Excel and have it answered in no time.

Similar Excel Tutorials

Find a desired result by having Excel automatically change input values in Excel. Using Goal Seek, you setup a for ...

How to calculate the percentage amount that a value has changed in Excel. This includes quickly calculating this v ...

I have found a rather convoluted method to Calculate the Number of Years, Months and Days between to Dates in Excel ...

How to calculate the total number of working days between two dates in Excel.  This allows you to exclude all weeke ...

Helpful Excel Macros

- Import data from the web into Excel with this macro. This is a basic web query macro that will import data from any web

- This free Excel macro formats a selection of cells as a Percentage in Excel. This simply changes a cell's number format

- This UDF (user defined function) calculates the Future Value of Compound Interest in Excel. The mathematical formula th

- This free Excel macro filters data to display the bottom X percent of the data set in Excel. This is a great macro to u

- This macro will hide all formulas within a workbook and not allow them to be deleted. The page will not be protected li

Similar Topics

Sale = A1
Cost = B1
Margin = C1

I know to calculate Margin its' C1=1-(B1/A1) and to calculate Sale its, A1=B1/(1-C1), and I can do that in separate columns. But...... I'm tasked with trying to find a way so that I can do it in three columns. As in if I change cost then margin recalculates or if I change margin then sale recalculates. I'm thinking that this is going to cause a circular error but my boss says there's got to be a way to do it, figure it out. Any suggestions?


I have a list of 5 buildings each with different unit counts, and an average price sold for each building. How can I get the average price of all units sold?

312 $1000
54 $1010
35 $1835
32 $1028
53 $1937


I'm not sure how to do this, but I want the Total (column D) to be the sum of the Unit Price (column C) times the Quantity (column A). Is there a formula you can apply to a column or do I have to do it in individaul cells?

I have a spreadsheet where I need to calculate the increase in % one year over the other in column D for Eg if Profits are 95415 in Jan 2008 (Column B) and 80215 in Jan 2008 (Column C), then the % Increase will be (95415-80215)/80215 *100

I can calculate the formula for this, but the problem comes where for eg there is a loss in Jan 2008 for -95415 and there was a profit in Jan 2007 for 80215. How do I set up formula to take negatives & positives into account in calculating the increase or decrease/

Your assistance or anybody's on the forum will be greatly appreciated




Even though I have used Page Layout to set my margins at .3 left and right, I cannot make my columns as wide as they need to be because the spreadsheet continues to print with one inch margins. I am on a deadline -- Help!

I am trying to correct a formula for a productivity worksheet in excel. The idea is that we would have the ability to input the number of hours worked each day and the number of direct hours (working with clients) per day. Then take the daily percentages and add them then devide them to determine the final productivity percentage for the week. Additionally not everyone works a full week so I would need it to only divide the percentages of the days that were completed. Any suggestions? or does anybody know a formula that would accomplish this already? I am good with basic excel and was able to identify a flaw in the current productivity sheet.

Hi there

I am trying to calculate our On Time Delivery. I want this as a simple percentage of jobs. I have got this running in the following way:

Column M - Estimated Delivery dates
Column N - Actual Delivery dates
Column O - =IF(SUM(M2-N2)>0,1,0)

Then I have calculated On Time Delivery as: =SUM((SUM(O2:O252))/(COUNTA(N2:N252)))

This seems to work fine. My problem is, if we enter a date in Estimated without a corresponding Actual date, the formula for Column O fills out anyway and improves our On Time Delivery Percentage. How can I set this up so that the formula doesn't calculate if there is no data in Column N?

Any help much appreciated



I would like to know how to make excel calculate which inventory is left in the FIFO method, quantities that are bought first are the first to be sold. Basically where the quantity and price is derived from.

For example:
bought 100 on FEB 1 $1
bought 500 on FEB 1 $1
bought 1000 on FEB 10 $1
sold 300 on FEB 12 $1.5
bought 100 on FEB 13 $1.1
sold 100 on FEB 13 $1.2
bought 1000 on FEB 14 $1
bought 400 on FEB 15 $1
sold 2000 on FEB 19 $1.5

For this, the formula/function would know that:
=>for the 300 sold on FEB 12, 100 bought on FEB 1 is depleted and 200 of the 500 bought on FEB 1 is depleted.
=>for the 100 sold on FEB 13, the 100 bought on FEB 13 is depleted
=>for the 2000 sold on FEB 19, it knows that:
==>the 100 bought on FEB 1, the 200 of the 500 bought on FEB 1, and the 100 bought on FEB 13 is depleted so it can't consider those quantities
==>it would consider the remaining 300 of the 500 bought on FEB 1, 1000 bought on FEB 10, and 700 of the 1000 bought on FEB 14

The remaining quantities that are left would be the remaining 300 of the 1000 bought on Feb 14 and the 400 bought on FEB 15.

I would like to know for each sold transaction, which quantities at which prices on which day were sold.

Thanks in advance!

Hello all,

New to the forums.

I'm in the process of creating a new report and I'm stuck.

My report consists of a set target in a field, a score and percentage of target.

e.g Target is 400

score is 450.

Percentage is 1.125 of target. (=score/target)

Now what I would like to do is create a formula that does not go above 100%, but instead work in reverse if you go over the target.

E.g. Target 400 .. Score was 450 ... percentage of target is 87.5%

Thanks in advanced.

Hi everyone....this is my first post here ....and not my last I believe!

My question I believe is easily solvable for you cracks of excel.
I have a worksheet with a list of rows (item#, date, price, etc). In the last column of this list I can put an x for some of the items.
On another worksheet or sheet, I need to autoamtically have a list of the items in the first list above, that have an X in the last columns.
I created an example on a worksheet attached just for you to understand.
I apreciate all the help I can get.
Thank you so much.

I am trying to write a formula that uses both an if statement and a vlookup statement.

It's for a house cleaning price list, with two sets of prices. I want the formula to say if the value in E7 is R, i want to lookup the value for the house in the second column. If the value in the cell is anything else, i want to lookup the value for the house in the third column.

So in sense, my formula should look like =IF (E7=1,"=VLOOKUP(A10,'Clean Prices'!$A$2:$C$58,2,FALSE)","=VLOOKUP(A10,'Clean Prices'!$A$2:$C$58,3,FALSE)")

But it doesn't work. Is it possible to nest a vlookup in an if statement?

I have a spreedsheet that shows some percentages example( 9.98% and 15.87%) I am needing to find a way to hide the percentage sign so that they just show as 9.98 and 15.87. The problem I am having is that are been worked out as a percentage, so changing the format of the cell does not work.
Can anyone help?


Hey everyone,

I'm really hoping someone can help me with this...

I need to plot percentages over time in a line graph in excel. I don't want to have to do a percentage equation in the spreadsheet, I just want excel to take two sets of values and display the percentage in the chart. For example, I need B1 as a percentage of B2 for week 1, C1 as a percentage of C2 for week 2, etc....
Can someone please offer a suggestion for how to do this? I would really appreciate it.
Also, would it be possible to link data from other sheets in the workbook into one single chart?

I would like the contents of a selected active cell to be displayed in a certain other cell, say R4. When another cell is selected and active, that cell's contents should be displayed.

I have an array of 9 columns and 20 rows with equity symbols and conditionally formatted to show the severity of price movement in either direction.

Instead of typing in the value of whatever cell a trader is looking at I would like for them to just be able to click on the cell and have that symbol copied into R4 so some detailed information can be displayed for them.

Can't find a thing about this on any forum or msdn.

Hope I'm explaining this at least somewhat clearly.


I am trying to automatically capture and record the date of a cell's last change in value (date stamp). I have an item price list and if a particular cell gets updated I want to automatically record the date of change of that cell. I realize that after I change cell A1 I could tab to cell B1 and enter Ctrl+; but if I have a hundred new prices to enter I don't want to do that (plus me or the data entry person might forget).

For instance,

1 $32.17 8/17/08
2 $43.20 9/12/09

If I go in and update cell A1 to $33.98 today I would like cell B1 to read 2/16/10. But I don't want cell B2 to change.


I am needing a formula that would cause a currency amount from a calculation to round up or down to the nearest 100.00 mark. The current formula is ie: =E10*F10 (e10 being an amount of money and f10 being a percentage fo it.) I am needing the resulting answer to round up or down to the nearest 100. So if the answer is below the 50 mark it would round down and above it would round up. If that is not possible then just rounding down would be acceptable.

How do i do this??


I have never really used VBA and so am completely stuck at this problem. I need to create a macro which auto-populates a master worksheet from the individual user sheets in a shared workbook.

Sheet 1 is the master sheet "Team Stats". There will be an undetermined number of individual worksheets to accomodate new staff.

Each worksheet will be identical, using columns A-I with row 1 having the headings:

Date, Name, Reference, Value, Price, Age, Purchased?, Destination, Add. Products (the last 3 columns will have a drop-down list which will be used to enter data into the cell).

There will be a varying number of rows in each of the individual sheets.

If possible I would like the macro to run every time data is entered into one of the individual worksheets. If this is not then it would be fien to update every time the workbook is opened.

If anyone can help it would really cut down the time I spend collating these stats every day!


I have a table with various percentages, and I would like a formula to have an average of these. Please see attached file to get more of an idea.


I have an excel worksheet that adds two other worksheets in a data
triangle. I copied it to create a new data set and used find &
replace to change the worksheet references to the new ones.

The cells still contain the result of the old formula referring to the
previous worksheets. The only way I can get the formula to return the
correct result is to edit (F2) each cell and press enter. Calc now
(F9) does nothing.

I've seen this before, but this time, I need to calculate many
thousands of cells and don't have time for this workaround.

Any ideas?


Don S

I need a formula to calculate Turn Around Time. Find below the sample data and details for your reference.

Received Date & Time: 10/29/2010 3:27:00 PM
Completed Date & Time: 11/1/2010 3:57:32 AM
Business Hours: 08:00 AM to 05:00 PM
Non Business hours: 05:00 PM to 08:00 AM
Weekdays : Monday to Friday
Weekends: Saturday & Sunday

If I calculate TAT for this time period it should show me 1 hour 33 minutes, why because business hours are closing by 5:00 PM on 10/29 so it should not calculate duration after 5:00 PM to until 08:00 AM on next day, however 10/29 is Friday so formula should calculate the duration from 10/29 Friday 3:37 PM to 10/29 5:00 PM and again it should calculate from 8:00 AM on 11/01 Monday and formula should skip Saturday & Sunday.

In this scenario I have completed the task before 8:00 AM on 11/01 so it should show duration of 1hour 33 minutes.

Please let me know if you need any more details


I have two columns of data: column A contains the date and time in the form dd/mm/yyyy. Column B contains a number value. All the times are in order, so column A looks like:


I have data from 2007 to 2010. I need to calculate an average daily value (in column B) for each month, and display it in column C. So, for January, I need to calculate the average of 31 days, February, 28 days, etc.

Is there a function I can use to do this? I've been trying the AVERAGEIF formula but can't get it to work. Any ideas would be much appreciated!

Many thanks,

How can I stretch a spreadsheet to fit the page? If I try to make it one page by one page, it changes nothing. If I change the percentage, it becomes two wide...I am just trying to change the height so that it can be read on an 8.5 x 11 piece of paper.


Firstly i haven't used excel to a great extent since my college days. So i'm having to re-learn 99.9% of everything i once new...

I am volunteering for a non profit organization and trying to create a reservation system for the rooms that they have - kind of like hotel software, but in excel (i did a similiar thing in college but for plane seats)

Please find it attached.

What i need it to do:

Copy all of the info from the main page to the guest lit (a new row each time).

From the guest list to the Gannt chart - i did a few tutorials on dynamic gantt charts using conditional formatting but cannot get them to work when based on data on a different worksheet.

Finaly is there a way to check for availabilty on any given date?

if just someone could point me in the right direction, i would be appreciate it so much words can't express!!!

Best Regards,


P.S for the calender drop down on the main page, i'm using 'microsoft time & date picker 6.0)

/ - pop ups on this site

/ - same file, better website

This formula is supposed to calculate difference between today and date hired to give years and months of service. Works fine for all except if the person was hired in year 2000 then this formula shows 110 y. Any one know how to fix this? or have a different formula that works.

=DATEDIF(E21,TODAY(),"y")&" y "&DATEDIF(E21,TODAY(),"ym")&" m"


I am trying to figure out how to write a formula to figure out production cycle time.
We will be building 8 "widgets" a day.
We will work 10 hours a day.
There is a 20 minute break at 9:20 am.
Production shuts down for lunch 30 minutes for lunch at 12:30.
Production starts at 6:00 am.
Here is what I can do.
Production cycle time = (10*60)-30/8 or 71.25 minutes
If we start at 6:00 am, the first scheduled cycle completion time = TIME(6,0,0+71.25/1440)

My problem is when I am trying to use a logical "IF' statement to account for the 20 minute break or lunch and still calculate the end of each cycle time through the day I receive a number of error messages.
This is the formula I am trying to make work. I have the cell the formula is in, formatted with a "mm,ss" format.
I have included an attachment to help (a picture is worth a thousand words).

Any help will be greatly appreciated.
I have bought a number of books in an attempt to figure this out, and I am still stumped

Related pages

countif not blankweekly payslip templateexcel vba continue forhow to install acroexch23 mpg to liters per 100kmexcel xnpvhlookup vbaexcel import multiple csv filesvba join functionhow to calculate discount percentage in excelbloomberg commandstraining record template in excelexcel vba count rowshow to arrange alphabetically in excelvba excel to wordsql query results to excelvba application.worksheetfunctionexcel splitting cellshow to add a horizontal line in excel graphsumifs multiple criteriaconvert feet to decimal feetwatermark for excelhow to insert a new worksheet in excelcountif by colorexcel count populated cellsfree timesheet calculator exceljob card format excel sheetcalculate elapsed time excelpivot table data source reference is not validnegative irr excelhow to delete blank pages in excelautofill numbersshort key for subscript in wordutm coordinates in google earthautofit excel vbaexcel macro to delete blank rowshelp robocopyexcel vba remove duplicateshow to convert kilograms to pounds formulacounting colored cells in excelamortization calculator 360 day yearsorting function in excelhow to change width of column in excel 2007rename hyperlinkexcel compress file sizeexcel stop macrotranspose function in excel 2007how to enter subtraction formula in excelwhat is 45 minutes as a decimalweek commencing excelhow to create an org chart in powerpointperform a spelling check on the active worksheetexcel round 2 decimal placesslicer in excel 2007transpose command in excelstaff rota examplehow to combine multiple excel files into oneactivecell formuladifference between irr and mirrhow to calculate time cards manuallyformula for compound interest in excelpersonal xlshow to get out of compatibility mode in excelvba inputbox typehow to convert to percentage in excelexcel vba memory managementhide and unhide columns in excelvba newlineplus or minus symbol excelvba themecolor