 Trending Categories
 Data Structure
 Networking
 RDBMS
 Operating System
 Java
 MS Excel
 iOS
 HTML
 CSS
 Android
 Python
 C Programming
 C++
 C#
 MongoDB
 MySQL
 Javascript
 PHP
 Physics
 Chemistry
 Biology
 Mathematics
 English
 Economics
 Psychology
 Social Studies
 Fashion Studies
 Legal Studies
 Selected Reading
 UPSC IAS Exams Notes
 Developer's Best Practices
 Questions and Answers
 Effective Resume Writing
 HR Interview Questions
 Computer Glossary
 Who is Who
Difference between Gravitational Force and Electrostatic Force
Force is a physical quantity which is defined as a pull or push of a body having certain mass. Force is the factor that causes a change in the velocity of a body. Basically, a force is an external agent causes the change in the state of an object, i.e., it may move the object or may stop the movement of moving body.
Force is a vector quantity. Thus, it has both magnitude and direction. Force may be classified into two broad categories namely contact force and noncontact force.
Contact force is the one that acts on a body by making a direct contact with the body.
Noncontact force is the one that acts on the body through space without having direct contact with the body.
A generalized formula of force is given by the Newton's second law of motion, which is,
$$F\:=\:ma$$Where, 'F' is force, 'm' is the mass of body, and 'a' is acceleration (change in velocity of body due to force). The SI unit of force is Newton (N).
This article is meant for explaining the differences between gravitational force and electrostatic force. Where, both gravitational and electrostatic forces are the types of noncontact forces. Before, going to discuss the differences, we learn the basics of gravitational force and electrostatic force so it becomes easy to understand the differences between them.
What is Gravitational Force?
The force of attraction exerted by an object on another objects due to their mass is called the gravitational force. If out of two, one body is the earth, then it is called gravity. The gravitational force can be only an attraction force, it can never be repulsive. Though, the gravitational force is a noncontact force. Therefore, for the existence of gravitational force between two bodies, the direct contact between the bodies is not required.
If there are two bodies having masses M1 and M2 respectively and are separated by a distance of R meters, then the gravitational force is given by
$$F\:\alpha\:\frac{M_1M_2}{R^2}$$ $$\Rightarrow\:F\:=\:G\frac{M_1M_2}{R^2}$$Where, G is the constant of proportionality, called gravitational constant. In SI units, the value of G is −
$$G\:=\:6.67\:\times\:10^{11}Nm^2kg^{2}$$Numerical Example 1
Two bodies having masses 500 kg and 700 kg are separated by a distance of 200 meters. Calculate the force of attraction between the bodies.
Solution
Given data,
 Mass of body 1, $M_1$ = 500 kg
 Mass of body 2, $M_2$ = 700 kg
 Distance between bodies,$R$= 200 m
Therefore, according to the Law of Gravitational Force, we get,
$$F\:=\:G\frac{M_1M_2}{R^2}$$ $$\Rightarrow \:F\:=\:\frac{(6.67\:\times\:10^{11})\times\:500\times\:700}{200^{2}}$$ $$F\:=\:5.84\:\times\:10^{10}N$$Thus, the force of attraction between the given bodies is of 5.84 × 10^{−10} N.
What is Electrostatic Force?
A force that acts between two bodies due to their electric charges is called electrostatic force. Therefore, the electrostatic force is the one that a charged body exerts on another charged body. Just like the gravitational force, the electrostatic force is also a noncontact and hence do not require direct contact between bodies for their existence.
Unlike the gravitational force, the electrostatic force may be an attractive force or a repulsive force. It is an attractive force, if the two charged bodies carry different charges, like one carries positive charge and another carries negative charge. On the other hand, if both charged bodies carry same charge, i.e. positivepositive or negativenegative, then the electrostatic force acting between them is of repulsive nature.
The electrostatic force is formulated by the Coulomb's Law as,
$$F\:=\:k\frac{Q_1\:Q_2}{r^2}$$Where, k is constant of proportionality, Q1 and Q2 are the charges on bodies, r is the distance between two charged bodies. The value of k is given by,
$$k\:=\:\frac{1}{4\pi\epsilon_0\epsilon_r}$$Where,$\epsilon_0$ and $\epsilon_r$are the permittivity of vacuum and relative permittivity of medium respectively.
$$\epsilon_0\:=\:8.85\:\times\:10^{12}\:Fm^{1}$$The following example illustrates the process of determining the electrostatic force acting between two charged bodies.
Numerical Example 2
Two charged bodies carrying electric charge of +5 C and 10 C and are separated from each other by a distance of 10 meters in free space. Determine the electrostatic force acting between them.
Solution
Given data,
 $Q_1$ = +5 C and $Q_2$ = −10 C
 r = 10 m
Therefore, according to coulomb's law of electrostatics, we get,
$$F\:=\:k\frac{Q_1\:Q_2}{r^2}$$ $$\Rightarrow \:F\:=\:\frac{(9\:\times\:10^{9})\times\:5\times\:10}{10^{2}}$$ $$\therefore\:F\:=\:4.5\:\times\:10^9\:N$$Hence, the electrostatic force between the two bodies is 4.5 × 10^{9} N and it is an attractive force because the charges on the bodies are opposite
Difference between Gravitational Force and Electrostatic Force
Gravitational force and electrostatic force are both noncontact forces. However, there are several major differences between gravitational force and electrostatic force, the following table highlights all those differences:
Basis of Difference  Gravitational Force  Electrostatic Force 

Definition  A force of attraction that a body exerts on another body due to their mass is called gravitational force.  A force of either attraction or repulsion that a body exerts on another body due to their charge is called electrostatic force. 
Cause of existence  Gravitational force is only due to mass of the body.  Electrostatic force is exists due to charge on the body. 
Nature of force  Gravitational force is only an attractive force.  Electrostatic force may be an attractive force or a repulsive force. 
Effect of surrounding medium  The gravitational force is not affected by the medium in which the two bodies are placed.  Electrostatic force depends on the medium in which the bodies are placed. 
Expression  The gravitational force is given by, $$F\:=\:G\frac{M_1\:M_2}{R^2}$$  The electrostatic force is given by, $$F\:=\:k\frac{Q_1\:Q_2}{r^2}$$ 
Constant of proportionality  The gravitational constant (G) (which is the constant of proportionality) has a value that is constant at any point in this universe. It is, $$G\:=\:6.674\:\times\:\mathrm{10^{11}Nm^2kg^{2}}$$  In case of electrostatic force, the constant of proportionality is 'k' whose value depends on the medium. The value of k in free space is, $$k\:=\mathrm{\:8.85\:\times\:10^{12}Fm^{1}}$$ 
Strength  The gravitational force is comparatively a weak force.  The electrostatic force is stronger than gravitational force. 
Importance  The following are facts that show the importance of gravitational force −

The electrostatic force is important because it enables us to find the electric force experienced by a charge due to another charge (or charges). It also enables us to find the electric field intensity at a place. 
Applications  The gravitational force is used to calculate the time period of modern artificial satellites, prediction about lunar and solar eclipses, etc.  Electrostatic force is used in laser and inkjet printers, Xerox machine, electrostatic air filter, etc. 
Conclusion
From the above discussion, we can conclude that gravitational and electrostatic forces are different in many aspects, but both are types of noncontact forces, which means they do not need a direct contact between two bodies for their existence.