The length should be less than 30 seconds.
For Windows:
1. Click on iTunes Library
2. Click the song youd like to edit
3. Locate the start and end times of the selection you want. To do this, move the iTunes playback head (at the top of iTunes) to the start of the selection and note the start time. Then move the playback head to the end of the selection and note the end (stop) time.
4. Click on File Get Info Options
5. Click on Start Time and enter the start time you noted
6. Click on Stop Time and enter the end time you noted
7. Click on OK
8. Click on iTunes Preferences Importing
9. In Import Using, click on AAC Encoder
10. Click on OK
11. Click on iTunes Advanced Convert Selection to AAC
12. Right click the new AAC track and choose to find in on your computer
13. Rename the new AAC track as a .m4r
14. Double click the new .m4r which will open up into the ringtones section of iTunes
15. Sync new ringtone to iphone