The words in and within often cause confusion. Some writers use the word within in places where it is inappropriate or wrong. I once saw an advert from a university that was inviting applications for the position of Professor within Economics. If you know that within often can be replaced by inside, it is clear that the ad looked slightly ridiculous.

In my job as copyeditor of scientific texts, I see within more often than I would like. Perhaps those who write within may think the word makes a text more scholarly. As you can see from the example above, within may look ludicrous.

IN

In is used about place or time:

He was in the kitchen.
My daughter lives in Italy.
This happened in late September.
See you in a minute. 
I haven’t felt this happy in years. 

WITHIN

Within often means inside a certain area, according to particular limits or rules, or during a certain period of time:

An angry voice was heard from within.
After she had left, I had a warm feeling within me.
Don’t place this medicine within the reach of children!
Delivery is free of charge within a thirty-kilometre limit.
From your hotel, the picturesque gardens are within easy reach.
I am not sure we can do this within budget.
Within minutes of arriving at the railway station, I heard a loud voice calling my name.
They had had three burglaries within six months.

A little girl is stretching to reach an apple hanging from a tree. The image illustrates the use of in and within.
Just within reach

IN AN HOUR OR WITHIN AN HOUR?

I’ll be back in an hour means that I ’ll be back in about one hour, perhaps fifty, sixty, or seventy minutes from now.

I’ll be back within an hour means that I’ll be back at any time before an hour has passed but in one hour at the latest.

I hope this has helped you understand the difference between in and within.