Missing Number Finder
Enter a list of integers to find all missing numbers between the minimum and maximum values. Outputs each missing number on a separate line. Processing takes…
Start using
What This Tool Does
This tool identifies every integer that is absent from a given list, within the range defined by the smallest and largest numbers in that list. It assumes a continuous sequence with a step of one. For instance, if you input 1, 2, 4, 6, the tool will output 3 and 5 because those are the integers missing between 1 and 6.
The endpoints themselves are not considered missing. The tool works with negative numbers, zero, and positive integers, as long as they are safe JavaScript integers (within the range of ±9,007,199,254,740,991).
How to Use the Tool
Simply paste or type your list of integers into the input area. The tool accepts numbers separated by commas, spaces, or line breaks. Duplicate numbers are ignored, and the order of input does not affect the result. After clicking the button, the missing numbers are displayed in ascending order, one per line.
For example, input 10, 8, 5 will output 6, 7, 9 because those are the missing numbers between 5 and 10.
Processing Rules and Limits
The tool checks membership using a Set, so duplicates and input order do not affect the outcome. The missing numbers are always emitted in ascending numeric order.
To prevent performance issues, the following limits are enforced:
- The difference between the maximum and minimum values cannot exceed 100,000.
- The input source cannot exceed 100,000 characters.
- The number of parsed numbers cannot exceed 10,000.
If any of these limits are exceeded, the tool will not process the input and will display an error message.
All input values must be safe integers. Decimals, fractions, or numbers outside the safe integer range will be rejected.
Example
Suppose you have a list of employee IDs: 101, 102, 104, 107. The minimum is 101 and the maximum is 107. The tool will find the missing IDs: 103, 105, and 106. This can help you identify gaps in a sequence.
Frequently Asked Questions
Can this tool find missing dates or numbers with a different step?
No. This tool is designed for continuous integer sequences with a step of one. It does not detect missing dates, nor does it infer a different interval (e.g., every other number). For sequences with a different step, you would need a different approach.
What happens if I enter duplicate numbers or numbers out of order?
Duplicates are ignored, and the order does not matter. The tool uses a set to check membership, so the result is always the same regardless of duplicates or input order.
Are there any limitations on the size of the input?
Yes. The span between the maximum and minimum values cannot exceed 100,000. Additionally, the input text cannot exceed 100,000 characters, and the number of parsed numbers cannot exceed 10,000. These limits prevent the tool from freezing your browser.
Practical Checklist
- Ensure all numbers are integers (no decimals).
- Check that the numbers are within the safe integer range.
- Verify that the range (max - min) is ≤ 100,000.
- Confirm that the sequence you expect is step-one continuous.
- Review the output to ensure it matches your expectations.
Processing takes place locally in your browser.