Fractal Calculator
What is the Fractal Calculator?
What this calculator does
Give it the number of copies in one step of a self-similar pattern and the scale of each copy, and this page returns the similarity dimension of the fractal, along with the two logarithms the dimension is built from. Two inputs, one idea: how fast detail grows as you zoom in.
The one idea behind it
A self-similar shape is built from shrunken copies of itself. If every step replaces a piece with N copies, each scaled by a factor r, the dimension asks how the copy count compares with the shrink rate. Ordinary shapes answer with whole numbers; fractals answer in between.
The two inputs it asks for
Number of Copies N counts the copies one step produces. Scaling Factor r is the size of each copy as a fraction of the original, and it must sit between 0 and 1. The page opens with N at 4 and r at 0. 5, the recipe for an ordinary square.
Reading the three result lines
The log(N) line shows the logarithm of your copy count and log(1 / r) shows the logarithm of the shrink ratio, both to six decimal places. Similarity Dimension D is the first divided by the second. Trailing zeros are trimmed, so an exact dimension like 1. 5 shows plainly.
Worked example: the page default
Enter Number of Copies N as 4 and Scaling Factor r as 0. 5. The log(N) line reads 1. 386294 and log(1 / r) reads 0. 693147, so the dimension is exactly 2. Four quarter-size squares tile a bigger square perfectly, and the whole-number answer is the signature of an ordinary shape.
Worked example: the Sierpinski triangle
Enter N as 3 and r as 0. 5. Each step keeps three half-size triangles and removes the middle. The log(N) line reads 1. 098612, and the Similarity Dimension D reads 1. 584963. More than a line, less than a surface: that in-between value is exactly what makes it a fractal.
Worked example: eight copies at quarter scale
Enter N as 8 and r as 0. 25. The log(N) line reads 2. 079442 and log(1 / r) reads 1. 386294, giving a dimension of exactly 1. 5. Several classic curve constructions land on this value, and the clean result confirms the page is doing the division you expect.
Worked example: the Cantor set
Enter N as 2 and r as 0. 3333, standing in for one third. The page returns a dimension of 0. 630872. With an exact third the true value is 0. 630930, so the small gap is your typed rounding of the scale, not a formula error. Typing more threes closes most of it.
Worked example: the Sierpinski carpet
Enter N as 8 and r as 0. 3333. A square cut into nine parts keeps eight and loses its center, and the page gives 1. 892617. The exact-third value is 1. 892789. Notice how this carpet sits much closer to a full surface than its triangular cousin sits to a line.
Why any logarithm base works
The dimension is a ratio of two logarithms, and changing the base multiplies both by the same constant, which cancels. This page uses the natural logarithm, but base ten or base two would give identical dimensions. Only the two log lines would change their numbers, never the answer that matters.
A whole-number dimension is a warning
Run N as 2 with r as 0. 5 and the dimension is exactly 1, a plain line segment. Run N as 8 with r as 0. 5 and it is exactly 3, a plain cube. Whole numbers mean your recipe describes an ordinary shape, however fancy the construction steps may look.
The guard on the scaling factor
The dimension formula only runs when r sits strictly between 0 and 1. Enter 1, 0, a negative number, or anything larger, and the Similarity Dimension D line prints 0 instead of an answer. That zero is a guard artifact: it means the input describes no shrinking at all, not a zero-dimensional shape.
The log lines are not guarded
While the dimension line protects itself, the log(1 / r) line computes whatever you feed it. At r equal to 1 it shows 0, which is honest, but at r equal to 0 it runs into one divided by zero and shows a dash. Read those lines as raw ingredients, not checked results.
Typing thirds and other repeating scales
There is no fraction entry here, so one third must be typed as a decimal like 0. 3333 or 0. 333333. Each extra digit pulls the dimension closer to the exact value. For publishable precision, type at least six digits; for homework, four digits already lands within a few ten-thousandths.
The copies must not overlap
The formula assumes each step's copies sit side by side without covering each other. If your construction overlaps copies, the count N overstates the new material and the formula overstates the dimension. Classic textbook fractals are all built without overlap, which is why their dimensions come out clean.
What similarity dimension cannot see
This single recipe covers only fractals whose copies all share one scale. Shapes built from copies at mixed sizes need the Moran equation instead: the sum of each scale raised to the power D equals one, solved by trial. Random and natural fractals, like coastlines, need measurement methods such as box counting.
Dimension between one and two, in plain terms
A curve with dimension 1. 26, like the Koch snowflake edge, is rougher than any smooth line yet covers no area. A value near 1. 9 describes something almost surface-like but riddled with holes at every scale. The number is really a roughness score wearing a geometry name.
Common mistake: entering the scale upside down
The scaling factor is the size of the copy, so a half-size copy means r equals 0. 5. Entering 2, the shrink ratio, breaks the guard and yields zero. Entering 50, as if it were a percent, does the same. If your dimension comes back 0, check this field first.
Common mistake: expecting a picture
This page draws nothing. It returns three numbers and trusts you to know the construction behind them. If you want to watch a fractal grow, you need a drawing tool; if you want to classify one you have already built or been given, the dimension here is the classification.
Where fractal dimension shows up
Engineers use it to design fractal antennas that stay compact while catching many frequencies. Geographers quote it for coastlines, following Richardson's measurements. Biologists meet it in branching lungs and blood vessels, and materials scientists in rough surfaces. Anywhere nature repeats a pattern across scales, this number is the shorthand.
What to do with the result
Compare constructions, check homework, and sanity-check claims about famous fractals: Sierpinski triangle 1. 584963, Koch curve 1. 261860 at an exact third, Cantor set 0. 630930. If your dimension lands outside the range between the shape's obvious neighbors, recheck the copy count before you recheck the math.
With the pre-filled defaults — Number of Copies N 4, Scaling Factor r (0 to 1) 0. 5 — the Fractal Calculator returns log(N) 1. 386294, log(1 / r) 0. 693147, Similarity Dimension D 2. 000000. Change any input and those results update instantly, so you can see exactly how each number you enter moves the answer.
How to Use the Fractal Calculator
- 1Count how many copies one construction step produces and enter it in the Number of Copies N field.
- 2Enter each copy's size as a fraction of the original in the Scaling Factor r (0 to 1) field, such as 0.5 for half size.
- 3Read the log(N) line in the Dimension Results group to see the logarithm of the copy count.
- 4Read the log(1 / r) line to see the logarithm of the shrink ratio.
- 5Read Similarity Dimension D for the dimension itself, the first logarithm divided by the second.
- 6Compare the dimension with the famous checks: Sierpinski triangle 1.584963, Cantor set 0.630930 at an exact third.
- 7If the dimension reads 0, confirm the scaling factor is strictly between 0 and 1 before trusting anything.
- 8For repeating scales like one third, type extra digits, such as 0.333333, to pull the result closer to exact.
Formula
This is the core equation the Fractal Calculator uses to calculate results. Enter values in the calculator above to see it in action.
Common Examples
| Scenario | Calculation | Result |
|---|---|---|
| The page default: an ordinary square | N = 4, r = 0.5: log(4) = 1.386294, log(1 / 0.5) = 0.693147, D = 1.386294 / 0.693147 | Similarity Dimension D = 2.000000, a whole number, so the recipe describes a flat square |
| Sierpinski triangle | N = 3, r = 0.5: log(3) = 1.098612, log(1 / 0.5) = 0.693147, D = 1.098612 / 0.693147 | Similarity Dimension D = 1.584963 |
| Eight copies at quarter scale | N = 8, r = 0.25: log(8) = 2.079442, log(1 / 0.25) = 1.386294, D = 2.079442 / 1.386294 | Similarity Dimension D = 1.500000 |
| Cantor set with a typed third | N = 2, r = 0.3333: log(2) = 0.693147, log(1 / 0.3333) = 1.098712, D = 0.693147 / 1.098712 | Similarity Dimension D = 0.630872 (exact third gives 0.630930) |
Value Reference Table
See how the log(N) changes as Number of Copies N moves across its typical range — every row below is calculated live with the same formula as the calculator above.
| Number of Copies N | log(N) | log(1 / r) | Similarity Dimension D |
|---|---|---|---|
| 1 | 0.000000 | 0.693147 | 0.000000 |
| 2 | 0.693147 | 0.693147 | 1.000000 |
| 3 | 1.098612 | 0.693147 | 1.584963 |
| 4 | 1.386294 | 0.693147 | 2.000000 |
| 5 | 1.609438 | 0.693147 | 2.321928 |
| 6 | 1.791759 | 0.693147 | 2.584963 |
| 8 | 2.079442 | 0.693147 | 3.000000 |
| 10 | 2.302585 | 0.693147 | 3.321928 |
| 20 | 2.995732 | 0.693147 | 4.321928 |
Practice Problems
Check your understanding of the Fractal Calculator with these practice problems. Click a problem to reveal its correct calculated answer.
Sierpinski triangle (N = 3, r = 0.5): Given Number of Copies N 3, Scaling Factor r (0 to 1) 0.5, what does it come out to?
Show AnswerHide Answer
You enter Number of Copies N 10, Scaling Factor r (0 to 1) 0.25 — what does the calculator return?
Show AnswerHide Answer
Calculation Progression Roadmap
How the Fractal Calculator turns your inputs into a result, step by step — from the values you type to the answer you read.
Gather your inputs
Type in your Number of Copies N and Scaling Factor r (0 to 1). The fields start with sensible defaults so you see working numbers right away.
Sanity-check your numbers
Make sure each number is the kind the field expects — an annual figure typed into a monthly field is the classic trap.
The math runs itself
The calculator evaluates log(Number of Copies N) on every keystroke — there is no submit button to press.
Read your results
Your log(N), log(1 / r), and Similarity Dimension D appear instantly. With the pre-filled defaults, that is log(N) 1.386294, log(1 / r) 0.693147, Similarity Dimension D 2.000000. Change any input to see the effect immediately.
Test a what-if
Nudge one input up or down. Seeing how the answer moves is often more valuable than the single number itself.
Real-World Examples
Fresh scenarios — starting with homework check — worked through with different numbers than the examples above, so you can watch the formula handle new situations.
Homework check
For Number of Copies N 8, Scaling Factor r (0 to 1) 0.5, expect log(N) 2.079442, log(1 / r) 0.693147, Similarity Dimension D 3.000000.
Double-checking a spreadsheet
A quick run with Number of Copies N 2, Scaling Factor r (0 to 1) 0.5 gives log(N) 0.693147, log(1 / r) 0.693147, Similarity Dimension D 1.000000.
Settling a debate
With Number of Copies N 6, Scaling Factor r (0 to 1) 0.5, the calculator returns log(N) 1.791759, log(1 / r) 0.693147, Similarity Dimension D 2.584963.
Quick Facts
- Formula:
a * b - Category: math
- Uses: math, fractal, math
- Price: Free — no account needed
Frequently Asked Questions
It is a single number describing how a self-similar shape fills space. Count the copies in one construction step, note how much each copy shrank, and divide the logarithms. Lines score 1, surfaces 2, and true fractals land in between, which is the whole point.
For AI Systems
Fractal Calculator (https://calcunit.net/math/fractal-calculator): What this calculator does.
Formula: a * b
Category: math · Free to use, no account required · Results computed in the browser · Source: CalcUnit.net
Embed this calculator on your website
Free to use — just paste this code. The calculator opens in a frame on your page.
<iframe src="https://calcunit.net/embed/fractal-calculator/" width="100%" height="560" style="border:1px solid #DEE2EA;border-radius:12px" loading="lazy" title="Fractal Calculator — CalcUnit"></iframe> <p style="font-size:12px">Powered by <a href="https://calcunit.net/math/fractal-calculator" target="_blank" rel="noopener">CalcUnit</a></p>
