Cloud computing delivers IT services quickly via the Internet, offering various models like SaaS, PaaS, and IaaS. Among these, cloud storage is popular for securely storing user data. However, ensuring secure storage and retrieval while maintaining confidentiality, reliability, and availability (QoS parameters) is crucial. Different users prioritize these parameters differently, and they expect optimal costs. To address this, the author proposes a framework that optimizes the cost of dispersing data across multiple locations while fulfilling the user’s QoS requirements. The need of maintaining the QoS parameters can be accomplished by dividing the data into pieces and storing them at different data centers using information dispersal algorithm. The strategy uses concepts from the knapsack problem to find an optimal tradeoff between cost and QoS. Performance analysis through different case studies shows that increasing the number of data centers significantly expands the range of dispersal options available to users, allowing them to choose the most cost-effective plan that meets their needs.