Fill nine squares with numbers between 1 to 9
Rule: total of numbers from any side will be equal to 15.
If it have any formula, please tell me.

Here's a method for a 4-by-4 Magic Square.
We have a 4-by-4 grid.
Consider the cells on the two diagonals.
. .
Start at the upper-left and write then numbers one to sixteen in order,
moving to the right and down, but only in the diagonal cells.
. .
Start at the lower-right and write the numbers 1 to 16 in order,
. . moving left and upward, but only in the empty cells.
. .
. . . ta-DAA!
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
This Magic Square is filled to capacity with the sum of 34.
The four rows, four columns, and two diagonals total 34.
And there are numerous symmetric sets which total 34.
. . . .Central 4 . . . . 4 Corners
. .
. .
. .
. .
. .
Did I miss any?
Is this not enough:?
Easy method for the 3x3 magic square
This is an old mentalism trick to convince someone you have super math powers or can read minds.
What is a Magic Square?
Yes, I see a formula, lets try a 5x5 though so you could see the pattern
Fill 25 squares with numbers between 1 to 25
Rule: total of numbers from any side will be equal to 65.
Start with 1 in the middle top row. Then 2 should be one column to the right and one row up from 1, since there are no spot there, it goes to the way bottom of the column next right column from 1. Then 3 should be one column to the right and one row up. Then 4 should be one column to the right and one row up, since there are no spot there, it goes to the way left of the next top row where the 3 is at. Then 5 should be one column to the right and one row up from 4. Then 6 should be one column to the right and one row up from 5, but since 1 is there, it go below 5. etc
? / ? / 1 / 8 /15
? / 5 / 7 /14/16
4 / 6 /13/ ? / ?
10/12/ ? / ? / 3
11/ ? / ? / 2 / 9