I am trying to calculate percentage, and my results are not correct. Suppose a Student Scores 18.70 out of 30 in Subject1 & 29.75 out of 40 in Subject2.
I have calculated percentage of Subject1 as 62.33% & for Subject2 74.38%.
While calculating the final percentage If I average both percentages I get 68.35% but If I calculating the percentage by adding scores of both Subjects i.e. 48.45 out of 70 the percentage is 69.21%.
I know know 69.21% is correct but I fail to understand why average is coming wrong, and is there any way with which I can get final percentage from percentages in each subject.
I know I am very bad in math,
be gentle.
 A: The results differ because subject 2 was "more important" than subject 1. (subject 2 represents 40/70 of the whole evaluation and subject 1 represents 30/70). However you can get the final porcentage in this way. $$ \frac{(62.33)(30)+(74.38)(40)}{70}=69.21$$
This is called weighted average.
A: It is not clear from the original post just what is being asked,
There are two subjects.  The assessment tool to evaluate each one has a different maximum number of possible marks.  This decision does not have anything to do with the relative importance of the two subjects. 
You have correctly converted these marks to percentages, so the results in the two subjects can be compared.
If you were told that the two subjects were equally important in finding the overall mark, you would average the two percentages.
If you were told that the subjects' importance was in direct proportion to the total marks available in each one, then you would proceed as in the accepted answer.  But what if the instructor in Subject #1 decides to report the mark as $187$ out of $300$?  Does that change the students overall program grade? Should it?
A: try this if it makes sense;
18.7 + 29.75=48.45 this is your total score out of 70 right,
now lets assume you have the first test 5/5 and the second 43.45/65 which is 48.45/70....the same value right? 
but if you do the percentage now its (100%+66.8%)/2=83.4% 
you are giving a different weight from from different measurments the same weight and consequently influencing the final value. I would simply add numerators and denominator and then calculate the final percentage or do what Jose Luis said above to account for the differnt weights of measurments.  
