Calculator Inputs
Enter a center value and a step value. The calculator accepts whole numbers, decimals, fractions, and mixed numbers such as 1 1/2.
Example Data Table
This sample uses center value 5/2 and step value 1/3. The generated magic sum is 15/2.
| Cell 1 | Cell 2 | Cell 3 |
|---|---|---|
| 7/2≈ 3.5000 | 7/6≈ 1.1667 | 17/6≈ 2.8333 |
| 11/6≈ 1.8333 | 5/2≈ 2.5000 | 19/6≈ 3.1667 |
| 13/6≈ 2.1667 | 23/6≈ 3.8333 | 3/2≈ 1.5000 |
Formula Used
Core model: every cell is built from a center fraction c and a step fraction d using a shifted Lo Shu pattern.
| a₁₁ = c + 3d | a₁₂ = c - 4d | a₁₃ = c + d |
| a₂₁ = c - 2d | a₂₂ = c | a₂₃ = c + 2d |
| a₃₁ = c - d | a₃₂ = c + 4d | a₃₃ = c - 3d |
Magic sum: M = 3c
Each row, column, and diagonal totals the same sum because the step offsets in every valid line cancel to zero. Fraction results are simplified by dividing numerator and denominator by their greatest common divisor.
How to Use This Calculator
- Enter a center value. This controls the overall magic sum because the final sum is always three times the center.
- Enter a step value. This spreads the surrounding cells around the center while keeping all line sums equal.
- Choose decimal precision and display mode. You can inspect exact fractions, decimal approximations, or both together.
- Press the button to generate the square. Review the validation table, Plotly graph, and export the result as CSV or PDF.
Frequently Asked Questions
1. What is a fraction magic square?
It is a 3×3 number grid where every row, column, and diagonal has the same total, but the entries are fractions instead of whole numbers.
2. How is the magic sum calculated?
This calculator uses a center-step model. The common total for each row, column, and diagonal is always three times the center value.
3. Can I enter mixed numbers and decimals?
Yes. You can enter values like 2, 0.75, 7/9, or 1 1/2. The calculator converts them into simplified fraction form internally.
4. What happens if the step value is zero?
All nine cells become the same as the center value. The square still balances, but it is no longer varied because every entry repeats.
5. Why do all lines stay equal?
The offset pattern is designed so each valid line contains positive and negative step changes that cancel out. Only the center contribution remains.
6. Will every generated square have unique entries?
Unique values appear whenever the step is not zero. If the step becomes zero, the calculator reports repeated cells through the distinct count.
7. Why show decimals when fractions are exact?
Decimals help you compare magnitude quickly, spot spread, and understand the graph visually. Fractions remain best for exact mathematical interpretation.
8. What do the CSV and PDF exports contain?
They include the chosen inputs, summary metrics, the generated 3×3 square, and the row, column, and diagonal sums for reporting.