What is the difference between equation and formula? Sometimes equation and formula are used interchangeably, but I was wondering if there is a difference.
For example, suppose we can calculate a car's fuel efficiency as:
mpg = distance traveled in miles / the fuel used in a gallon

Is that an equation or formula?
 A: I'd say an equation is anything with an equals sign in it; a formula is an equation of the form $A={\rm\ stuff}$ where $A$ does not appear among the stuff on the right side. 
A: Please down vote me if you wish - but I would say these words are really synonyms to each other. They both express that there is some underlying relation between some mathematical expressions.   
A: An equation is any expression with an equals sign, so your example is by definition an equation.  Equations appear frequently in mathematics because mathematicians love to use equal signs.
A formula is a set of instructions for creating a desired result.  Non-mathematical examples include such things as chemical formulas (two H and one O make H2O), or the formula for Coca-Cola (which is just a list of ingredients). You can argue that these examples are not equations, in the sense that hydrogen and oxygen are not "equal" to water, yet you can use them to make water.
Mathematicians have long since realized that when it comes to numbers, certain formulas can be expressed most succinctly as equations.  For example, the Pythagorean Theorem $a^2+b^2=c^2$ can be thought of as a formula for finding the length of the side of a right triangle, but it turns out that such a length is always equal to a combination of the other two lengths, so we can express the formula as an equation.  The key idea is that the equation captures not just the ingredients of the formula, but also the relationship between the different ingredients.
In your case, "mpg = distance/gallons" is best understood as "a formula in the form of an equation", which means that in this instance the two words are interchangeable.
A: A formula is an equation that shows the relationship between two or more quantities.  It would be the rule or instructions that is use to show the relationship between two or more quantities.
An equation is a problem displayed with numerals or symbols with an equals (=) sign included somewhere; usually near the end of the equation.  Unless, it is a ratio or division.
A: You solve an equation, while you evaluate a formula. 
By the way, an equation that holds whatever the values of the variables is an identity. 
A: An equation is meant to be solved, that is, there are some unknowns. A formula is meant to be evaluated, that is, you replace all variables in it with values and get the value of the formula. 
Your example is a formula for mpg. But it can become an equation if mpg and one of the other value is given and the remaining value is sought.
A: $e=mc^2$ and $f=ma$ are "equations", not normally called "formulas". You wouldn't say the "force formula", but the "force equation". They can have an infinite number of solutions. so i'd say the terms are interchangeable too.
http://en.wikipedia.org/wiki/Force
A: A simple answer comes from https://www.bbc.co.uk/bitesize/guides/zwbq6yc/revision/1
For your convenience a succinct explanation from the link is:
A formula:


*

*shows the relationship between two or more variables (e.g. $\frac{9}{5}^{\circ}C + 32 =^{\circ}F$)

*is a calculation for a specific purpose (e.g. the conversion from Celsius to Fahrenheit)

*is always true, subject to certain conditions, no matter the inputs.


An equation: 


*

*will usually have only one variable, though it may appear more than once

*will be correct only for certain values (e.g. $2x = 10$ is only true for $x = 5$)

*is not always true.


Though I suggest you look at expressions and identities too.
A: An equation is a statement that connects two expressions with an $=$ sign and asserts their equality.
An identity is an equation that holds for every possible variable tuple (for which the identity is defined):

*

*$(x+y)^2\equiv x^2+y^2+2xy$
A conditional equation holds for some variable tuple(s):

*

*$x^2+ky^2=1\quad$ (the parameter $k$ is an arbitrary constant, varying to generate a family of equations)

*$2x^2+3x-5=0\quad$ (in the context of equation-solving, $x$ is an unknown)

*In a formula (the rule of a function) like $$V=\pi r^2h,$$ each input tuple returns an output called the subject.

An inconsistent equation holds for no variable tuple:

*

*$|2x|=x-1$

Addendum
A constant whose value is unspecified, a parameter and an arbitrary constant all mean the same, and has a unspecified value (unless instantiated) in the context or problem. The first term emphasises the placeholder's fixed value within the context (in contrast with a variable), the second term emphasises its varying value across contexts (in similarity with a variable), while the third term emphasises that its choice of value isn't important.
In the context of a constraint problem, a variable or a parameter or lettered constant can also called an unknown.
A: An equation is a relationship that defines a restriction. for instance: $ area >= 2*depth*ratio $
In a formula, the equal sign actually means an assignment ($ \leftarrow  $): e.g. $ f(x,y) \leftarrow  x^2+y^2 $
A: TL;DR I'd say it really depends on the context.

What I remember in high-school/secondary school:
We were given problems like

Given length and area of a rectangle, find its width.

(Not exactly rectangle. that's of course more primary/grade school. Can be rectangular prism or whatever.)
The 'formula' is $A =wl$.
The 'equation' is what you get when you plug in the given values for $A$ and $l$. So if you have $A=10$ and $l=7$, then the equation is $10=7w$.
At the time, I thought it was very nit-picky/subjective/conventional/contextual. Now, I still do but I have the 10,000+ rep and bachelor's and master's degrees to complain about it.
According to my secondary school teachers, what you provided is a formula, but that's in the context of filling in the blanks of equation and formula in school.
Conclusion: I'd say it really depends on the context. If you define equation as a statement with an equal sign, then every formula with an equal sign is an equation... By the way, it seems on Wikipedia that there are no inequalities that are formulas.
A: In a formula all the variables can be arbitrarily chosen.
An equation  admits only particular values of non-constant variable/s.
A: My definitions will focus on mathematics.
In context of mathematics, an equation is a mathematical expression in terms of numbers, variables, operations, and equals sign which is satisfied by some specific values of a desired variable for given values of other variable(s) in it.
In context of mathematics, a formula is an equation in which a desired variable is expressed explicitly in terms (i.e. explicit function) of other variable(s).
In your case, car's fuel efficiency mpg is explicitly expressed in terms of distance traveled and fuel used i.e. ratio of distance and fuel used. Therefore it is best a formula.
NOTE: In context of mathematics, every formula is an equation but an equation is not necessarily a formula.
A: One way to answer this question has been developed in the first and second courses of U.S. high school algebra.
In the fist course, the following definitions are formally stated in the glossary.

equation: A statement formed by placing an equals sign between two numerical or variable expressions.

For example, $11-7=4$, $5x-1=9$, and $y+2=2+y$ are all equations because they all satisfy the given definition.
The following definition for a formula is also found formally stated in the glossary:

formula: An equation that states a rule about a relationship.

Here are two useful formulas: $A=lw$, the formula for the area of a rectangle; $P=2l+2w$, the formula for the perimeter of a rectangle.
While at the beginning of the the second course, the following sentence summarizes that the relationship is between two or more variables:

A formula is an equation that states a relationship between two or more variables.

