diff --git a/README.md b/README.md
index 565b1ca..f28d1b7 100644
--- a/README.md
+++ b/README.md
@@ -1,2 +1,2 @@
# Free-Browser-Math-Worksheet-Generator
-Generate addition, subtraction or multiplication problems. Set the number of problems per page, digit range and export as PDF. Generate infinite worksheets for completely free in the browser. Download as image or PDF
+Generate addition, subtraction, multiplication, and division problems. Set the number of problems per page, digit range and export as PDF. Generate infinite worksheets for completely free in the browser. Download as image or PDF
diff --git a/index.html b/index.html
index 94521e0..5ff6fba 100644
--- a/index.html
+++ b/index.html
@@ -81,6 +81,7 @@
Math Worksheet & Answer Sheet Generator
+
@@ -224,9 +225,22 @@
Answer Sheet Preview
while(arr.length < total && attempts < maxA) {
attempts++;
- let a = r(topMin, topMax), b = r(botMin, botMax);
-
- if(op==='-' && nonNegSub && a < b) [a,b] = [b,a];
+ let a, b;
+
+ if(op==='/') {
+ // Pick divisor (bottom) and quotient from ranges, compute dividend (top)
+ b = r(botMin, botMax);
+ if(b === 0) continue;
+ const qMin = Math.max(1, Math.ceil(topMin / b));
+ const qMax = Math.floor(topMax / b);
+ if(qMin > qMax) continue;
+ const q = r(qMin, qMax);
+ a = b * q;
+ } else {
+ a = r(topMin, topMax);
+ b = r(botMin, botMax);
+ if(op==='-' && nonNegSub && a < b) [a,b] = [b,a];
+ }
let key;
if(op==='+' || op==='×') {
@@ -241,24 +255,33 @@