You can't upgrade a weapon directly from 2 stars to 4, you have to go through 3 stars as well. Here are the alchemy costs for things according to star level:
★☆☆☆☆: 200 crowns and 10 energy
★★☆☆☆: 400 crowns and 50 energy
★★★☆☆: 1,000 crowns and 200 energy
★★★★☆: 2,500 crowns and 400 energy
★★★★★: 5,000 crowns and 800 energy
In addition to that, items from 3 stars onward require heat in order to be upgraded. 3-star items take 5 levels of heat, and 4-star ones take 10 levels.
Most craftable items also require a recipe, which cost:
★☆☆☆☆: 250 crowns
★★☆☆☆: 1,000 crowns
★★★☆☆: 4,000 crowns
★★★★☆: 10,000 crowns
★★★★★: 25,000 crowns
There are some exceptions to this, but most of them are boss-token reward items, or shadow lair sets.