<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" version="2.0">
    <channel>
        
        <title>
            <![CDATA[ fractions - freeCodeCamp.org ]]>
        </title>
        <description>
            <![CDATA[ Browse thousands of programming tutorials written by experts. Learn Web Development, Data Science, DevOps, Security, and get developer career advice. ]]>
        </description>
        <link>https://www.freecodecamp.org/news/</link>
        <image>
            <url>https://cdn.freecodecamp.org/universal/favicons/favicon.png</url>
            <title>
                <![CDATA[ fractions - freeCodeCamp.org ]]>
            </title>
            <link>https://www.freecodecamp.org/news/</link>
        </image>
        <generator>Eleventy</generator>
        <lastBuildDate>Sat, 23 May 2026 22:21:12 +0000</lastBuildDate>
        <atom:link href="https://www.freecodecamp.org/news/tag/fractions/rss.xml" rel="self" type="application/rss+xml" />
        <ttl>60</ttl>
        
            <item>
                <title>
                    <![CDATA[ Fraction Math: How to Do Fractions for Beginners ]]>
                </title>
                <description>
                    <![CDATA[ By Alexander Arobelidze We deal with fractions every day. But what exactly is a fraction? How do we get to know them better? In this tutorial we will explore the basics and practice together, so fractions can become valuable helpers in everyday life ... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/fraction-math-how-to-do-fractions-for-beginners/</link>
                <guid isPermaLink="false">66d45d5b33b83c4378a517b2</guid>
                
                    <category>
                        <![CDATA[ fractions ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Math ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Wed, 11 Mar 2020 18:57:45 +0000</pubDate>
                <media:content url="https://cdn-media-2.freecodecamp.org/w1280/5f9c9c2f740569d1a4ca3077.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Alexander Arobelidze</p>
<p>We deal with fractions every day. But what exactly is a fraction? How do we get to know them better? In this tutorial we will explore the basics and practice together, so fractions can become valuable helpers in everyday life and beyond. </p>
<h2 id="heading-part-1-fraction-as-a-share">Part 1. Fraction as a share</h2>
<p>Let's imagine a whole pie divided into 4 equal parts. One part is shaded red.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/03/fraction1.png" alt="Image" width="600" height="400" loading="lazy">
<em>image of a circle with one quarter shaded red</em></p>
<p><strong>One</strong> red part out of <strong>four</strong> equal parts means <strong>1/4</strong> of a whole is shaded. If we think of equal parts of a whole as shares, one share of a pie here is shaded red. </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/03/fraction2.png" alt="Image" width="600" height="400" loading="lazy">
<em>drawing of a fraction 1/4. 1 is a Numerator, 4 is a Denominator</em></p>
<p>The number 1 <strong>above</strong> the line is called a <strong>Numerator</strong>. It shows how many shares are shaded. The number 4 <strong>below</strong> the line is called a <strong>Denominator</strong>. It shows how many <strong>equal</strong> shares a whole is divided into. Let's look at another example.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/03/fractions3.png" alt="Image" width="600" height="400" loading="lazy">
<em>image of a circle with three sixths shaded red</em></p>
<p>The new pie above is divided into <strong>6</strong> equal shares. Therefore, the denominator will equal 6. Out of these 6 equal shares <strong>3</strong> are shaded red. Therefore, the numerator will equal 3. In other words, <strong>3/6</strong> of the pie is shaded. </p>
<p>Now let's test what we have learned so far. As you know, there are 24 hours in a whole day. If you spent 6 hours studying, what fraction of the day did you spend studying? </p>

<p></p><div><p></p>
<p></p><h3 id="heading-what-fraction-of-a-day-is-6-hours">What fraction of a day is 6 hours?</h3><br>    <p>Choose 1 answer</p>
    <hr><p></p>
<p>    </p><div id="block-11">
   
         
        6/24
        <span id="result-11"></span>
    </div>
    <hr><p></p>
<p>    </p><div id="block-12">
    
        <br>        6
        <span id="result-12"></span>
    </div><br>    <hr><p></p>
<p>    </p><div id="block-13">
    
        <br>        1/3
        <span id="result-13"></span>
    </div>
    <hr><p></p>
<p>    </p><div id="block-14">
        
         <br>         1/6
        <span id="result-14"></span>
    </div>
    <hr>
    Submit
</div>
<a id="showanswer1"></a><p></p>


<p>A day is divided into <strong>24</strong> equal shares called hours. So the Denominator will be 24. Think of the 6 hours spent studying as <strong>6</strong> shaded shares of the pie. That will make the Numerator equal 6. The fraction we are looking for is <strong>6/24</strong>.</p>
<h2 id="heading-part-2-simplifying-fractions">Part 2. Simplifying fractions</h2>
<p>Remember the pie from previous example? It had 3/6 of it shaded red. Let's add two new pies and look at them together.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/03/fractions4.png" alt="Image" width="600" height="400" loading="lazy">
<em>image of 3 circles with half of each painted red</em></p>
<p>The first pie is divided into 4 shares and two are shaded red. But as we can see that's half the pie. The second pie is divided into 6 shares and three are shaded red. Half of the pie again. Finally, the third pie is divided into two halves and one half is shaded red. </p>
<p>Since it's <strong>half</strong> a pie that's shaded in either case, we can conclude that the fractions are equal: <strong>2/4 = 3/6 = 1/2</strong>. </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/03/fraction5.png" alt="Image" width="600" height="400" loading="lazy">
<em>image of 3 circles with half of each painted red. 2/4 = 3/6 = 1/2</em></p>
<p>Finally, by multiplying or dividing both the numerator and denominator by the <strong>same</strong> number, the fraction will stay the same (except the case when division is by zero, which is outside of the scope of this article and will not be considered here). </p>
<p>This rule helps simplify fractions and makes using them easier. As an example, let's consider 4/12. Dividing numerator and denominator by 4 gives us (4 : <strong>4</strong>) / (12 : <strong>4</strong>) = 1 / 3. It's time to test your knowledge.</p>

<p></p><div><p></p>
<p></p><h3 id="heading-what-fraction-is-the-same-as-25">What fraction is the same as 2/5?</h3><br>    <p>Choose 1 answer</p>
    <hr><p></p>
<p>    </p><div id="block-21">
   
         
        4/25
        <span id="result-21"></span>
    </div>
    <hr><p></p>
<p>    </p><div id="block-22">
    
        <br>        5/2
        <span id="result-22"></span>
    </div><br>    <hr><p></p>
<p>    </p><div id="block-23">
    
        <br>        8/20
        <span id="result-23"></span>
    </div>
    <hr><p></p>
<p>    </p><div id="block-24">
        
         <br>         6/10
        <span id="result-24"></span>
    </div>
    <hr>
    Submit
</div>
<a id="showanswer2"></a><p></p>


<h2 id="heading-part-3-comparing-fractions">Part 3. Comparing fractions</h2>
<p>When we see two pieces of a pie, we can usually tell which one is larger. Similarly with fractions, there is a simple way of comparing them to each other. </p>
<p>Say we need to compare 1/3 and 2/7. Since they have different denominators, they have a different number of parts. So the <strong>First step</strong> must be to find the <strong>common ground</strong>. We do it by finding a <strong>common denominator</strong>. </p>
<p>One of the methods for finding a common denominator of two or more fractions is to multiply the denominators with each other. <strong>3</strong> times <strong>7</strong> = <strong>21</strong>. </p>
<p>Now that we found the common denominator, we need to replace each fraction's own denominator with the common denominator. </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/03/fraction6.png" alt="Image" width="600" height="400" loading="lazy">
<em>bringing 1/3 and 2/7 to the common denominator</em></p>
<p>The first fraction is 1/3, so we divide 21 by 3 and resulting <strong>7</strong> gets multiplied by that fractions numerator. Since the numerator equals 1, we get <strong>7 times 1 = 7</strong>. </p>
<p>The second fraction is 2/7, so 21 divided by 7 results in 3. Multiplying 3 times this fractions numerator, gives us <strong>3 times 2 = 6</strong>.  </p>
<p>Now that the fractions have the same denominator, we can finally compare them. 7 shares is more than 6 shares, therefore 7/21 is greater than 6/21. </p>
<p>The mathematical symbol denoting our result is the <strong>&gt;</strong> sign. <strong>7/21 &gt; 6/21</strong>. It is read as  "<strong>greater-than</strong>." The symbol denoting <strong>lesser-than</strong> looks like this: <strong>&lt;</strong>. We can rewrite our result like this: <strong>6/21 &lt; 7/21</strong>. </p>

<p></p><div><p></p>
<p></p><h3 id="heading-compare-34-and-57">Compare 3/4 and 5/7</h3><br>    <p>Choose 1 answer</p>
    <hr><p></p>
<p>    </p><div id="block-31">
   
         
        3/4 is less than 5/7
        <span id="result-31"></span>
    </div>
    <hr><p></p>
<p>    </p><div id="block-32">
    
        <br>        3/4 is greater than 5/7
        <span id="result-32"></span>
    </div><br>    <hr><p></p>
<p>    </p><div id="block-33">
    
        <br>        3/4 equals 5/7
        <span id="result-33"></span>
    </div>
    <hr><p></p>
<p>    </p><div id="block-34">
        
         <br>         They Cannot be compared
        <span id="result-34"></span>
    </div>
    <hr>
    Submit
</div>
<a id="showanswer3"></a><p></p>


<h2 id="heading-part-4-adding-fractions">Part 4. Adding fractions</h2>
<p>To add fractions, we again need to find a common denominator. Let's look at the following example. </p>
<p>We need to add <strong>2/7</strong> and <strong>3/9</strong>. The common denominator is <strong>7 times 9 = 63</strong>. The next step would be to replace each fraction's own denominator with the common one. </p>
<p>For the first fraction, <strong>63 divided by 7 = 9</strong> and <strong>9 times 2 = 18</strong>. The result is <strong>18/63</strong>. For the second one, <strong>63 divided by 9 = 7</strong> and <strong>7 times 3 = 21</strong>. The result is <strong>21/63</strong>. </p>
<p>Next, we add the numerators. <strong>18 plus 21 = 39,</strong> which leaves us with the sum of <strong>39/63</strong>. </p>
<p>As a useful habit, always check if the resulting fraction can be further simplified. </p>
<p>We know that 39 is evenly divisible by 3. 63 is also evenly divisible by 3. Since both numerator and denominator are divided by the same number, the fraction will remain the same. <strong>39 divided by 3 = 13</strong> and <strong>63 divided by 3 = 21</strong>. Our final result is <strong>13/21</strong>.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/03/fraction7.png" alt="Image" width="600" height="400" loading="lazy">
<em>Fraction addition calculation 2/7 + 3/9 = 39/63 = 13/21</em></p>
<p>What if we need to add mixed numbers? To add mixed numbers, we first add the whole numbers together and then the fractions. </p>
<p>For example, to add <strong>1 and a half</strong> to <strong>2 and a half</strong>, add <strong>1 and 2 = 3</strong>, then add <strong>1/2 and 1/2 = 1</strong>. Finally, <strong>add 3 and 1 = 4</strong>. Let's have some practice and remember how to simplify results. </p>

<p></p><div><p></p>
<p></p><h3 id="heading-what-is-the-result-of-46-29">What is the result of 4/6 + 2/9?</h3><br>    <p>Choose 1 answer</p>
    <hr><p></p>
<p>    </p><div id="block-41">
   
         
        8/9
        <span id="result-41"></span>
    </div>
    <hr><p></p>
<p>    </p><div id="block-42">
    
        <br>        9/8
        <span id="result-42"></span>
    </div><br>    <hr><p></p>
<p>    </p><div id="block-43">
    
        <br>        1/2
        <span id="result-43"></span>
    </div>
    <hr><p></p>
<p>    </p><div id="block-44">
        
         <br>         7/18
        <span id="result-44"></span>
    </div>
    <hr>
    Submit
</div>
<a id="showanswer4"></a><p></p>


<h2 id="heading-part-5-subtracting-fractions">Part 5. Subtracting fractions</h2>
<p>We'll start with two simple fractions. Subtract 1/3 from 3/5. As in the case of addition, we need to find a common denominator. So if we multiply our denominators, that <strong>equals 3 times 5 = 15</strong>. </p>
<p>Next, we replace old denominators with the common one.  </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/03/fraction8.png" alt="Image" width="600" height="400" loading="lazy">
<em>image of 3/5 - 1/3 = 4/15</em></p>
<p>Then we need to find our numerators. For the first fraction, <strong>15 divided by 5 = 3</strong> and <strong>3 times 3 = 9</strong>. The result is <strong>9/15</strong>. For the second one, <strong>15 divided by 3 = 5</strong> and <strong>5 times 1 = 5</strong>. The result is <strong>5/15</strong>. </p>
<p>The last step is to subtract the adjusted numerators: <strong>9 minus 5 = 4.</strong> The resulting fraction equals <strong>4/15</strong>.  </p>
<p>Let's now look at the case when we need to subtract a fraction from <strong>a whole</strong> number. Let's begin with <strong>1 - 2/7</strong>. </p>
<p>You remember from previous sections that a whole number is like a pie that is completely shaded. Thus, if a pie is divided into <strong>3</strong> parts, <strong>all 3</strong> parts are shaded. If it is divided into <strong>7</strong> parts, then <strong>7</strong> parts will be shaded. So, <strong>1 = 3/3 = 7/7</strong> etc. </p>
<p>Since we need to subtract <strong>2/7</strong>, we'll turn <strong>1 whole</strong> into <strong>7/7</strong> to make our task easy. <strong>7/7 minus 2/7 = 5/7</strong>. If the whole number is other than <strong>1</strong>, we write it as a mixed number and follow the steps from the last example. </p>
<p>So let's subtract <strong>2/7 from 3</strong>. </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/03/fraction9.png" alt="Image" width="600" height="400" loading="lazy">
<em>image of 3 - 2/7 = 19/7</em></p>
<p>Often, as a result of calculations, we may end up with a fraction where the numerator is greater than or equal to the denominator. Such fractions are called improper fractions. For example <strong>5/3</strong> (five thirds), <strong>7/2</strong> (seven halves) and so on. They can be converted to mixed numbers and vice versa. </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/03/fraction10.png" alt="Image" width="600" height="400" loading="lazy">
<em>Converting improper fractions to mixed numbers and vice versa</em></p>
<p>All the rules covered so far apply to improper fractions as well. </p>
 
<p></p><div><p></p>
<p></p><h3 id="heading-what-is-the-result-of-911-34">What is the result of 9/11 - 3/4?</h3><br>    <p>Choose 1 answer</p>
    <hr><p></p>
<p>    </p><div id="block-51">
   
         
        6/7
        <span id="result-51"></span>
    </div>
    <hr><p></p>
<p>    </p><div id="block-52">
    
        <br>        6/44
        <span id="result-52"></span>
    </div><br>    <hr><p></p>
<p>    </p><div id="block-53">
    
        <br>        3/44
        <span id="result-53"></span>
    </div>
    <hr><p></p>
<p>    </p><div id="block-54">
        
         <br>         6/11
        <span id="result-54"></span>
    </div>
    <hr>
    Submit
</div>
<a id="showanswer5"></a><p></p>


<h2 id="heading-part-6-multiplying-fractions">Part 6. Multiplying fractions</h2>
<p>Suppose we need to multiply two fractions, <strong>2/5 times 3/7</strong>. The <strong>numerator</strong> of the product will be the <strong>product of the numerators</strong> of these fractions: <strong>2 times 3 = 6.</strong> The <strong>denominator</strong> of the product will be the <strong>product of denominators</strong> of these fractions: <strong>5 times 7 = 35</strong>. Thus, <strong>2/5 times 3/7 = 6/35</strong>. </p>
<p>If we need to multiply a <strong>fraction</strong> by a <strong>whole number</strong>, the <strong>numerator</strong> of the product will be the <strong>product of the numerator of the fraction and that whole number</strong>. The <strong>denominator</strong> of the product will remain the same as the <strong>denominator of the fraction</strong>. </p>
<p>For example, <strong>3/10 times 5 = 15/10</strong>. To simplify, we divide the numerator and denominator by <strong>5</strong> and get <strong>3/2.</strong> </p>
<p>Finally, if we need to multiply mixed numbers, first we convert them to improper fractions, then multiply them as we did above. The example below shows the steps. </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/03/fraction11.png" alt="Image" width="600" height="400" loading="lazy">
<em>image of 3/2 times 11/5 equals 33/10</em></p>
<h2 id="heading-part-7-dividing-fractions">Part 7. Dividing fractions</h2>
<p>To divide fractions, flip the divisor so its numerator becomes the <strong>new denominator</strong> and denominator becomes the <strong>new numerator</strong>. Then just multiply the fractions like we did before. </p>
<p>For example, divide 3/7 by 2/5. After flipping, <strong>2/5</strong> becomes <strong>5/2</strong> and we end up multiplying <strong>3/7 times 5/2 = 15/14</strong>. </p>
<p>To divide fraction by a <strong>whole</strong> number, we invert that number and it becomes <strong>1 divided by that number</strong>. </p>
<p>For instance, <strong>2 becomes 1/2</strong>, <strong>9 becomes 1/9</strong> etc. Next, we multiply as above. As you probably guessed already, dividing mixed numbers works the same way. Let's look at the example below.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/03/fraction12.png" alt="Image" width="600" height="400" loading="lazy">
<em>dividing 11/6 by 17/8 = 44/51</em></p>
<p>Let's test your knowledge.</p>
 
<p></p><div><p></p>
<p></p><h3 id="heading-what-is-the-result-of-113-divided-by-117">What is the result of 11/3 divided by 11/7?</h3><br>    <p>Choose 1 answer</p>
    <hr><p></p>
<p>    </p><div id="block-71">
   
         
        3/7
        <span id="result-71"></span>
    </div>
    <hr><p></p>
<p>    </p><div id="block-72">
    
        <br>        3
        <span id="result-72"></span>
    </div><br>    <hr><p></p>
<p>    </p><div id="block-73">
    
        <br>        7
        <span id="result-73"></span>
    </div>
    <hr><p></p>
<p>    </p><div id="block-74">
        
         <br>         7/3
        <span id="result-74"></span>
    </div>
    <hr>
    Submit
</div>
<a id="showanswer7"></a><p></p>


<h2 id="heading-part-8-some-practical-examples">Part 8. Some practical examples</h2>
<p>In order to find a fraction of some number, we need to <strong>multiply</strong> the given <strong>number</strong> by that <strong>fraction</strong>. </p>
<p>Imagine, your school textbook has 200 pages. If you read 3/5 of the textbook, how many pages have you read? We are given the number which equals 200. To find 3/5 of 200, we multiply <strong>200 times 3/5</strong> and get  <strong>120</strong> pages. </p>
<p>Solve the next question on your own. My birthday cake had 12 pieces. A few friends came by and enjoyed 2/3 of the cake. How many pieces did my friends have?</p>
 
<p></p><div><p></p>
<p></p><h3 id="heading-how-many-pieces-did-my-friends-have">How many pieces did my friends have?</h3><br>    <p>Choose 1 answer</p>
    <hr><p></p>
<p>    </p><div id="block-81">
   
         
        2/3
        <span id="result-81"></span>
    </div>
    <hr><p></p>
<p>    </p><div id="block-82">
    
        <br>        4
        <span id="result-82"></span>
    </div><br>    <hr><p></p>
<p>    </p><div id="block-83">
    
        <br>        9
        <span id="result-83"></span>
    </div>
    <hr><p></p>
<p>    </p><div id="block-84">
        
         <br>         8
        <span id="result-84"></span>
    </div>
    <hr>
    Submit
</div>
<a id="showanswer8"></a><p></p>


<p>Finally, there is one more case I want to explore. What if we know what a given fraction of some number equals and we need to find that number? </p>
<p>For example, we know my friends had <strong>8</strong> pieces of the birthday cake and that was <strong>2/3</strong> of the <strong>whole cake</strong>. How many pieces did the cake have in the beginning? In order to find that <strong>whole number</strong>, we need to <strong>divide 8 by 2/3</strong>, which is <strong>12</strong>. </p>
<p>Solve the next question on your own. A race car drove 900 meters on a track, which is 3/5 of the whole distance. What's the length of the race track?  </p>
 
<p></p><div><p></p>
<p></p><h3 id="heading-what-is-the-length-of-the-race-track">What is the length of the race track?</h3><br>    <p>Choose 1 answer</p>
    <hr><p></p>
<p>    </p><div id="block-91">
   
         
        1200 meters
        <span id="result-91"></span>
    </div>
    <hr><p></p>
<p>    </p><div id="block-92">
    
        <br>        1500 meters
        <span id="result-92"></span>
    </div><br>    <hr><p></p>
<p>    </p><div id="block-93">
    
        <br>        2700 meters
        <span id="result-93"></span>
    </div>
    <hr><p></p>
<p>    </p><div id="block-94">
        
          
        540 meters
        <span id="result-94"></span>
    </div>
    <hr>
    Submit
</div>
<a id="showanswer9"></a><p></p>


 ]]>
                </content:encoded>
            </item>
        
    </channel>
</rss>
