Hasse Diagram Level Calculator
Enter positive integers to rank them by level in their divisibility Hasse diagram.
Result
How it is calculated
The tool reads your numbers (separated by spaces, commas or semicolons), drops duplicates and sorts them. Element a is below b when a < b and b mod a = 0. The level of an element is the length of the longest divisor chain inside your set that ends at it: level(e) = max(level(d) + 1) over every set member d that divides e, and 0 when none does. Elements at level 0 are the minimal ones. It reports the highest level and the height of the diagram (highest level + 1), then lists each level. Only whole numbers of 1 or more are accepted; a 0, a negative number, a decimal or a letter makes the whole input invalid.
Worked example
Set: 1, 2, 3, 4, 6, 8, 12, 24. The number 1 divides everything, so it is the only level-0 element. 2 and 3 are divisible only by 1, so level 1. 4 (via 2) and 6 (via 2 or 3) are level 2. 8 (via 4) and 12 (via 4 or 6) are level 3. 24 is above 8 and 12, so level 4. The tool prints a height of 5 and a maximum level of 4, with the layers L0: 1, L1: 2, 3, L2: 4, 6, L3: 8, 12, L4: 24.
Common mistakes
- Including 1 in the set: it divides every number, so it becomes the single bottom element and pushes every other level up by one.
- Expecting the level to be the number of prime factors: it only counts chains of divisors actually present in your set. Without 4, the number 8 sits right above 2.
- Confusing height with maximum level: height is the number of layers, which is the maximum level plus one.
- Typing a decimal such as 2.5 or a negative number and expecting it to be ignored: any invalid entry rejects the whole list.
- Assuming two numbers on the same level are comparable. 8 and 12 share a level but neither divides the other.
About this calculator
A Hasse diagram is a simplified visualization of a partial order that omits reflexive and transitive edges, drawing only the direct "covers" relations, with elements arranged so that a higher position means "greater" under the order. For the divisibility partial order on a set of positive integers, one element covers another when it's a direct multiple with no divisor of the set in between, and the level (rank) of an element reflects how many such covering steps separate it from the diagram's minimal elements.
This calculator takes a set of positive integers, builds the divisibility relation among them, and assigns each element its level in the resulting Hasse diagram. Discrete mathematics and order theory students use it to check homework on lattices and partial orders, since manually tracing covering relations and levels for more than a handful of numbers is tedious and error-prone by hand.
Was this helpful?
You can pick up to 3 reactions.
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
- Loan Calculator
- Profit Calculator
- Discount Calculator
- BMI Calculator
- Percentage Calculator
- Ideal Weight Calculator
- Age Calculator
- Pregnancy Due Date Calculator
- Compound Interest Calculator
- BMR Calculator (Basal Metabolic Rate)
- Tip Calculator
- Fuel Cost Calculator
- Date Difference Calculator
- Sleep Cycle Calculator
- Daily Water Intake Calculator
- Simple Interest Calculator
- Heart Rate Zones Calculator
- Running Pace Calculator
- Pet Age Calculator
- Calories Burned Calculator
- Macro Calculator
- TDEE Calculator (Total Daily Energy Expenditure)
- Waist-to-Hip Ratio Calculator
- Honor Roll Calculator
- One Rep Max (1RM) Calculator
- Ovulation Calculator
- Electricity Cost Calculator
- Unit Price Calculator
- Savings Goal Calculator
- Break-Even Point Calculator
- Paint Calculator
- Course Grade Average Calculator
- Business Days Calculator
- Time Duration Calculator
- Fuel Economy Calculator
- Temperature Converter
- Tile Calculator
- Aspect Ratio Calculator
- Roman Numeral Converter
- Goal Weight Timeline Calculator
- Salary Converter (Hourly to Annual)
- Credit Card Validator (Luhn)
- Body Surface Area (BSA) Calculator
- Feels-Like Temperature Calculator
- Ohm’s Law Calculator
- PPI (Pixel Density) Calculator
- Molar Mass Calculator
- Zodiac Sign Calculator (Western + Chinese)
- IBAN Validator
- Shoe Size Converter
- Country Info & Dialing Code Lookup
- Time Zone Difference (World Clock)
- CAGR (Compound Annual Growth Rate) Calculator
- Rule of 72 Calculator
- Blood Alcohol Content (BAC) Calculator
- Lean Body Mass (LBM) Calculator
- Pythagorean Theorem Calculator
- Speed Converter
- Download Time Calculator
- Date Calculator (Add/Subtract)
No calculators found
Comments