To understand the evolution of extinction curve , we calculate the dust evolution in a galaxy using smoothed particle hydrodynamics simulations incorporating stellar dust production , dust destruction in supernova shocks , grain growth by accretion and coagulation , and grain disruption by shattering . The dust species are separated into carbonaceous dust and silicate . The evolution of grain size distribution is considered by dividing grain population into large and small gains , which allows us to estimate extinction curves . We examine the dependence of extinction curves on the position , gas density , and metallicity in the galaxy , and find that extinction curves are flat at t \lesssim 0.3 Gyr because stellar dust production dominates the total dust abundance . The 2175 Å bump and far-ultraviolet ( FUV ) rise become prominent after dust growth by accretion . At t \gtrsim 3 Gyr , shattering works efficiently in the outer disc and low density regions , so extinction curves show a very strong 2175 Å bump and steep FUV rise . The extinction curves at t \gtrsim 3 Gyr are consistent with the Milky Way extinction curve , which implies that we successfully included the necessary dust processes in the model . The outer disc component caused by stellar feedback has an extinction curves with a weaker 2175 Å bump and flatter FUV slope . The strong contribution of carbonaceous dust tends to underproduce the FUV rise in the Small Magellanic Cloud extinction curve , which supports selective loss of small carbonaceous dust in the galaxy . The snapshot at young ages also explain the extinction curves in high-redshift quasars .