QUOTIENT function
PRO BASIC
The QUOTIENT function in Jspreadsheet Formulas Pro is used to return the whole number result of a division operation, disregarding any remainder. This function is useful when you only need the integer part of a division. For example, if you divide 10 by 3, the QUOTIENT function will return 3, ignoring the remainder. It's efficient when you need to determine how many times a number can be evenly divided.
Documentation
Returns the integer portion of a division operation. It discards the remainder and returns only the whole number that divides evenly into the dividend.
Category
Math and trigonometry
Syntax
QUOTIENT(numerator, denominator)
| Parameter | Description | 
|---|---|
numerator | 
The number to be divided. | 
denominator | 
The number by which to divide the numerator. | 
Behavior
The QUOTIENT function is used to return the integer portion of a division operation. Here's how it handles different types of inputs:
- Numbers: The function works flawlessly with numeric inputs. For example, QUOTIENT(10, 2) would return 5.
 - Empty Cells: If the denominator is empty, the function returns a #DIV/0! error. If the numerator is empty, the function is treated as 0.
 - Text: If either of the arguments is a text, the function would return a 
#VALUE!error. - Booleans: The function treats 
TRUEas 1 andFALSEas 0. For example, QUOTIENT(TRUE, 2) would return 0. - Errors: If either of the arguments is an error, the function would propagate that error. For instance, if the denominator is 
#DIV/0!, the function would also return#DIV/0!. 
Common Errors
| Error | Description | 
|---|---|
| #DIV/0! | This error occurs when the denominator is zero or an empty cell. | 
| #VALUE! | This error occurs when either the numerator or the denominator is non-numeric. | 
Best practices
- Always ensure that the denominator is not zero or an empty cell to avoid the
 #DIV/0!error.- Avoid using non-numeric values as arguments to the QUOTIENT function to prevent the
 #VALUE!error.- Be mindful of the fact that the QUOTIENT function only returns the integer portion of the result. If you need the remainder or the exact result of the division, consider using other functions such as MOD or DIVIDE.
 - Handle booleans carefully as they are treated as 0 and 1. If you have boolean values in your data, it might be safer to convert them to explicit numeric values before using them in the QUOTIENT function.
 
Usage
A few examples using the QUOTIENT function.
QUOTIENT(10,3) returns 3 because the integer part of 10 ÷ 3 is 3  
QUOTIENT(1000,7) returns 142 because 1000 ÷ 7 = 142 with a remainder of 6  
QUOTIENT(A1,B1) returns the integer portion of dividing the value in A1 by the value in B1  
Interactive Spreadsheet Demo
<html>
<script src="https://jspreadsheet.com/v11/jspreadsheet.js"></script>
<script src="https://jsuites.net/v5/jsuites.js"></script>
<link rel="stylesheet" href="https://jsuites.net/v5/jsuites.css" type="text/css" />
<link rel="stylesheet" href="https://jspreadsheet.com/v11/jspreadsheet.css" type="text/css" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Material+Icons" />
<script src="https://cdn.jsdelivr.net/npm/@jspreadsheet/formula-pro/dist/index.min.js"></script>
<div id="spreadsheet"></div>
<script>
// Set your JSS license key (The following key only works for one day)
jspreadsheet.setLicense('YjBiMDdlMTA5NzA4YzU4YzE0NmE4ZTU2NzA5MDdiMjc4ZDRjZjc1ODhlMDJjMTg1ZGRmNWE2MTQwNGZjYTJhOGIwNzQ5MmQ2YmEzMWY0N2M3MmU0NzcyNzk3MTY3ZDA2NTMzYzRiN2RlMGU3ZTc4YjI3ODFlOTBkZmIwNzI3NmQsZXlKamJHbGxiblJKWkNJNklpSXNJbTVoYldVaU9pSktjM0J5WldGa2MyaGxaWFFpTENKa1lYUmxJam94TnpZeU1qVTNNemswTENKa2IyMWhhVzRpT2xzaWFuTndjbVZoWkhOb1pXVjBMbU52YlNJc0ltTnZaR1Z6WVc1a1ltOTRMbWx2SWl3aWFuTm9aV3hzTG01bGRDSXNJbU56WWk1aGNIQWlMQ0p6ZEdGamEySnNhWFI2TG1sdklpd2lkMlZpWTI5dWRHRnBibVZ5TG1sdklpd2liRzlqWVd4b2IzTjBJbDBzSW5Cc1lXNGlPaUl6TkNJc0luTmpiM0JsSWpwYkluWTNJaXdpZGpnaUxDSjJPU0lzSW5ZeE1DSXNJbll4TVNJc0ltTm9ZWEowY3lJc0ltWnZjbTF6SWl3aVptOXliWFZzWVNJc0luQmhjbk5sY2lJc0luSmxibVJsY2lJc0ltTnZiVzFsYm5Seklpd2lhVzF3YjNKMFpYSWlMQ0ppWVhJaUxDSjJZV3hwWkdGMGFXOXVjeUlzSW5ObFlYSmphQ0lzSW5CeWFXNTBJaXdpYzJobFpYUnpJaXdpWTJ4cFpXNTBJaXdpYzJWeWRtVnlJaXdpYzJoaGNHVnpJaXdpWm05eWJXRjBJbDBzSW1SbGJXOGlPblJ5ZFdWOQ==');
// Set the extensions
jspreadsheet.setExtensions({ formula });
// Create a new spreadsheet
jspreadsheet(document.getElementById('spreadsheet'), {
  worksheets: [{
    data: [
    [
        "Items",
        "Per Box",
        "Full Boxes"
    ],
    [
        47,
        12,
        "=QUOTIENT(A2,B2)"
    ],
    [
        128,
        15,
        "=QUOTIENT(A3,B3)"
    ],
    [
        95,
        8,
        "=QUOTIENT(A4,B4)"
    ],
    [
        203,
        25,
        "=QUOTIENT(A5,B5)"
    ]
]
  }]
});
</script>
</html>
import React, { useRef } from "react";
import { Spreadsheet, Worksheet, jspreadsheet } from "@jspreadsheet/react";
import formula from "@jspreadsheet/formula-pro";
import "jsuites/dist/jsuites.css";
import "jspreadsheet/dist/jspreadsheet.css";
// Set license
jspreadsheet.setLicense('YjBiMDdlMTA5NzA4YzU4YzE0NmE4ZTU2NzA5MDdiMjc4ZDRjZjc1ODhlMDJjMTg1ZGRmNWE2MTQwNGZjYTJhOGIwNzQ5MmQ2YmEzMWY0N2M3MmU0NzcyNzk3MTY3ZDA2NTMzYzRiN2RlMGU3ZTc4YjI3ODFlOTBkZmIwNzI3NmQsZXlKamJHbGxiblJKWkNJNklpSXNJbTVoYldVaU9pSktjM0J5WldGa2MyaGxaWFFpTENKa1lYUmxJam94TnpZeU1qVTNNemswTENKa2IyMWhhVzRpT2xzaWFuTndjbVZoWkhOb1pXVjBMbU52YlNJc0ltTnZaR1Z6WVc1a1ltOTRMbWx2SWl3aWFuTm9aV3hzTG01bGRDSXNJbU56WWk1aGNIQWlMQ0p6ZEdGamEySnNhWFI2TG1sdklpd2lkMlZpWTI5dWRHRnBibVZ5TG1sdklpd2liRzlqWVd4b2IzTjBJbDBzSW5Cc1lXNGlPaUl6TkNJc0luTmpiM0JsSWpwYkluWTNJaXdpZGpnaUxDSjJPU0lzSW5ZeE1DSXNJbll4TVNJc0ltTm9ZWEowY3lJc0ltWnZjbTF6SWl3aVptOXliWFZzWVNJc0luQmhjbk5sY2lJc0luSmxibVJsY2lJc0ltTnZiVzFsYm5Seklpd2lhVzF3YjNKMFpYSWlMQ0ppWVhJaUxDSjJZV3hwWkdGMGFXOXVjeUlzSW5ObFlYSmphQ0lzSW5CeWFXNTBJaXdpYzJobFpYUnpJaXdpWTJ4cFpXNTBJaXdpYzJWeWRtVnlJaXdpYzJoaGNHVnpJaXdpWm05eWJXRjBJbDBzSW1SbGJXOGlPblJ5ZFdWOQ==');
// Set the extensions
jspreadsheet.setExtensions({ formula });
export default function App() {
    // Spreadsheet array of worksheets
    const spreadsheet = useRef();
    // Worksheet data
    const data = [
    [
        "Items",
        "Per Box",
        "Full Boxes"
    ],
    [
        47,
        12,
        "=QUOTIENT(A2,B2)"
    ],
    [
        128,
        15,
        "=QUOTIENT(A3,B3)"
    ],
    [
        95,
        8,
        "=QUOTIENT(A4,B4)"
    ],
    [
        203,
        25,
        "=QUOTIENT(A5,B5)"
    ]
];
    // Render component
    return (
        <Spreadsheet ref={spreadsheet}>
            <Worksheet data={data} />
        </Spreadsheet>
    );
}
<template>
    <Spreadsheet ref="spreadsheet">
        <Worksheet :data="data" />
    </Spreadsheet>
</template>
<script>
import { Spreadsheet, Worksheet, jspreadsheet } from "@jspreadsheet/vue";
import "jsuites/dist/jsuites.css";
import "jspreadsheet/dist/jspreadsheet.css";
import formula from "@jspreadsheet/formula-pro";
// Set license
jspreadsheet.setLicense('YjBiMDdlMTA5NzA4YzU4YzE0NmE4ZTU2NzA5MDdiMjc4ZDRjZjc1ODhlMDJjMTg1ZGRmNWE2MTQwNGZjYTJhOGIwNzQ5MmQ2YmEzMWY0N2M3MmU0NzcyNzk3MTY3ZDA2NTMzYzRiN2RlMGU3ZTc4YjI3ODFlOTBkZmIwNzI3NmQsZXlKamJHbGxiblJKWkNJNklpSXNJbTVoYldVaU9pSktjM0J5WldGa2MyaGxaWFFpTENKa1lYUmxJam94TnpZeU1qVTNNemswTENKa2IyMWhhVzRpT2xzaWFuTndjbVZoWkhOb1pXVjBMbU52YlNJc0ltTnZaR1Z6WVc1a1ltOTRMbWx2SWl3aWFuTm9aV3hzTG01bGRDSXNJbU56WWk1aGNIQWlMQ0p6ZEdGamEySnNhWFI2TG1sdklpd2lkMlZpWTI5dWRHRnBibVZ5TG1sdklpd2liRzlqWVd4b2IzTjBJbDBzSW5Cc1lXNGlPaUl6TkNJc0luTmpiM0JsSWpwYkluWTNJaXdpZGpnaUxDSjJPU0lzSW5ZeE1DSXNJbll4TVNJc0ltTm9ZWEowY3lJc0ltWnZjbTF6SWl3aVptOXliWFZzWVNJc0luQmhjbk5sY2lJc0luSmxibVJsY2lJc0ltTnZiVzFsYm5Seklpd2lhVzF3YjNKMFpYSWlMQ0ppWVhJaUxDSjJZV3hwWkdGMGFXOXVjeUlzSW5ObFlYSmphQ0lzSW5CeWFXNTBJaXdpYzJobFpYUnpJaXdpWTJ4cFpXNTBJaXdpYzJWeWRtVnlJaXdpYzJoaGNHVnpJaXdpWm05eWJXRjBJbDBzSW1SbGJXOGlPblJ5ZFdWOQ==');
// Set the extensions
jspreadsheet.setExtensions({ formula });
export default {
    components: {
        Spreadsheet,
        Worksheet,
    },
    data() {
        // Worksheet data
        const data = [
    [
        "Items",
        "Per Box",
        "Full Boxes"
    ],
    [
        47,
        12,
        "=QUOTIENT(A2,B2)"
    ],
    [
        128,
        15,
        "=QUOTIENT(A3,B3)"
    ],
    [
        95,
        8,
        "=QUOTIENT(A4,B4)"
    ],
    [
        203,
        25,
        "=QUOTIENT(A5,B5)"
    ]
]
        return {
            data
        };
    }
}
</script>
import { Component, ViewChild, ElementRef } from "@angular/core";
import jspreadsheet from "jspreadsheet";
import * as formula from "@jspreadsheet/formula-pro";
// Set your JSS license key (The following key only works for one day)
jspreadsheet.setLicense('YjBiMDdlMTA5NzA4YzU4YzE0NmE4ZTU2NzA5MDdiMjc4ZDRjZjc1ODhlMDJjMTg1ZGRmNWE2MTQwNGZjYTJhOGIwNzQ5MmQ2YmEzMWY0N2M3MmU0NzcyNzk3MTY3ZDA2NTMzYzRiN2RlMGU3ZTc4YjI3ODFlOTBkZmIwNzI3NmQsZXlKamJHbGxiblJKWkNJNklpSXNJbTVoYldVaU9pSktjM0J5WldGa2MyaGxaWFFpTENKa1lYUmxJam94TnpZeU1qVTNNemswTENKa2IyMWhhVzRpT2xzaWFuTndjbVZoWkhOb1pXVjBMbU52YlNJc0ltTnZaR1Z6WVc1a1ltOTRMbWx2SWl3aWFuTm9aV3hzTG01bGRDSXNJbU56WWk1aGNIQWlMQ0p6ZEdGamEySnNhWFI2TG1sdklpd2lkMlZpWTI5dWRHRnBibVZ5TG1sdklpd2liRzlqWVd4b2IzTjBJbDBzSW5Cc1lXNGlPaUl6TkNJc0luTmpiM0JsSWpwYkluWTNJaXdpZGpnaUxDSjJPU0lzSW5ZeE1DSXNJbll4TVNJc0ltTm9ZWEowY3lJc0ltWnZjbTF6SWl3aVptOXliWFZzWVNJc0luQmhjbk5sY2lJc0luSmxibVJsY2lJc0ltTnZiVzFsYm5Seklpd2lhVzF3YjNKMFpYSWlMQ0ppWVhJaUxDSjJZV3hwWkdGMGFXOXVjeUlzSW5ObFlYSmphQ0lzSW5CeWFXNTBJaXdpYzJobFpYUnpJaXdpWTJ4cFpXNTBJaXdpYzJWeWRtVnlJaXdpYzJoaGNHVnpJaXdpWm05eWJXRjBJbDBzSW1SbGJXOGlPblJ5ZFdWOQ==');
// Set the extensions
jspreadsheet.setExtensions({ formula });
@Component({
    standalone: true,
    selector: "app-root",
    template: `<div #spreadsheet></div>`
})
export class AppComponent {
    @ViewChild("spreadsheet") spreadsheet: ElementRef;
    // Worksheets
    worksheets: jspreadsheet.worksheetInstance[];
    // Create a new data grid
    ngAfterViewInit() {
        // Create spreadsheet
        this.worksheets = jspreadsheet(this.spreadsheet.nativeElement, {
            worksheets: [{
                data: [
    [
        "Items",
        "Per Box",
        "Full Boxes"
    ],
    [
        47,
        12,
        "=QUOTIENT(A2,B2)"
    ],
    [
        128,
        15,
        "=QUOTIENT(A3,B3)"
    ],
    [
        95,
        8,
        "=QUOTIENT(A4,B4)"
    ],
    [
        203,
        25,
        "=QUOTIENT(A5,B5)"
    ]
]
            }]
        });
    }
}