/Web APIs

StorageManager: estimate() method

Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.

The estimate() method of the StorageManager interface asks the Storage Manager for how much storage the current origin takes up (usage), and how much space is available (quota).

This method operates asynchronously, so it returns a Promise which resolves once the information is available. The promise's fulfillment handler is called with an object containing the usage and quota data.





Return value

A Promise that resolves to an object with the following properties:


A numeric value in bytes which provides a conservative approximation of the total storage the user's device or computer has available for the site origin or Web app. It's possible that there's more than this amount of space available though you can't rely on that being the case.


A numeric value in bytes approximating the amount of storage space currently being used by the site or Web app, out of the available space as indicated by quota. Unit is byte.

usageDetails Non-standard

An object containing a breakdown of usage by storage system. All included properties will have a usage greater than 0 and any storage system with 0 usage will be excluded from the object.

Note: The returned values are not exact: between compression, deduplication, and obfuscation for security reasons, they will be imprecise.

You may find that the quota varies from origin to origin. This variance is based on factors such as:

  • How often the user visits
  • Public site popularity data
  • User engagement signals like bookmarking, adding to homescreen, or accepting push notifications


In this example, we obtain the usage estimates and present the percentage of storage capacity currently used to the user.

HTML content

  You're currently using about <output id="percent"> </output>% of your
  available storage.

JavaScript content

navigator.storage.estimate().then((estimate) => {
  document.getElementById("percent").value = (
    (estimate.usage / estimate.quota) *



Browser compatibility

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari WebView Android Chrome Android Firefox for Android Opera Android Safari on IOS Samsung Internet
estimate 61 79 57 No 48 No 61 61 57 45 No 8.0
usageDetails 61 79 No No 48 No 61 61 No 45 No 8.0

See also

© 2005–2023 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.