Suggest an editImprove this articleRefine the answer for “What does $not do?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)`$not` is a logical negation operator that inverts a condition, making it the opposite, e.g. `{ age: { $not: { $gt: 18 } } }` returns documents where `age` is not greater than 18. **Key point:** `$not` is applied on top of another operator (`$gt`, `$lt`, `$regex`, etc.) and flips its condition.Shown above the full answer for quick recall.Answer (EN)Image`$not` is a logical negation operator. It **inverts a condition**, making it the opposite. **Example:** ```js db.users.find({ age: { $not: { $gt: 18 } } }) ``` The query returns documents where `age` **is not greater than 18** (that is, 18 or less). **The key idea:** `$not` is applied on top of another operator (`$gt`, `$lt`, `$regex`, etc.) and flips its condition.For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.