calculate edit